Reputation: 1991
I'd like to create a script that will toggle between setting the DNS settings of my wireless card between automatic selection and a particular IP (openDNS).
Can this be done, and if so what should I look in to?
Thanks!
Upvotes: 1
Views: 562
Reputation: 1
Thanks for the link back. Here is some info that may be helpful:
Upvotes: 0
Reputation: 1759
I personally would look at Powershell to do this. I found a post on how to change your ip settings in a one liner.
Get-WmiObject -class win32_networkadapterconfiguration | where-object -filterscript { $_.IPEnabled -eq ‘True’ -and $_.ServiceName -eq ‘E100B’ } | foreach-object -process { $_.EnableStatic(’192.168.1.200′,’255.255.0.0′) }
Author of this code's original post
Upvotes: 1