PS c:\> Set-DnsClientServerAddress -InterfaceIndex 10 -serveraddresses ("192.168.137.1")
Where:
10 - is the interface index. This can be found by running Get-NetAdpater, this will be the column named ifIndex.
("192.168.137.1") - is the DNS server address(es) you want to assign to that interface, this is a comma separated list.
Note:
This only works on Powershell 3 (or maybe later).
Reference(s):
http://4sysops.com/archives/how-to-configure-a-network-interface-card-nic-with-powershell-3/
Comments