Using PowerShell to change DNS servers

 

Using PowerShell to change DNS servers automatically

EXAMPLE 1
PS C:\>Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses ("10.0.0.1","10.0.0.2")
This example sets the DNS server addresses on a specified interface with the index value of 12.

EXAMPLE 2
PS C:\>Set-DnsClientServerAddress –InterfaceIndex 12 -ResetServerAddresses
This example resets the DNS client to use the default DNS server addresses specified by DHCP on the interface with an index value of 12.

More will follow soon!

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *