I have a DNS server that is misbehaving.
Some of my windows machines only have 2 dns servers
server01 192.0.2.1
server02 192.0.2.2
Some of my windows machines have 3 dns servers
server01 192.0.2.1
server02 192.0.2.2
server03 192.0.2.3
How can I remove server03 (192.0.2.3) from my dns settings using powershell?
PS C:\Windows\system32> Get-DnsClientServerAddress
InterfaceAlias Interface Address ServerAddresses
Index Family
-------------- --------- ------- ---------------
Ethernet 2 12 IPv4 {192.0.2.1, 192.0.2.2, 192.0.2.3}
Ethernet 2 12 IPv6 {}
Loopback Pseudo-Interface 1 1 IPv4 {}
I have very little windows experience. On linux, I would edit the resolv.conf
Update These are windows 2012 R2 servers
See http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/28/use-powershell-to-configure-static-ip-and-dns-settings.aspx