Tuesday, December 03, 2019

PS Quick Tips: Change Primary DNS Server of a network interface

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/

No comments:

How to configure ftp server on QNX 7.1 with PAM user authentication

How to configure ftp server on QNX 7.1 with PAM user authentication Create empty folder, I am using vm12 C:\> cd \ C:\> mkdir vms ...