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:

Using Emacs as editor for SBCL on Ubuntu 26.04

Using Emacs as editor for SBCL on Ubuntu 26.04 Version info: OS: Ubuntu 26.04 Emacs: 30.2 SBCL: 2.6.0 Install Emacs and SBCL...