Adjust Windows DNS settings from command line

If you ever wanted to change the DNS settings on Windows 7/8 here’s how you do it.

Open a command prompt with Administrator privileges, and type the following:

netsh interface ip set dns name="Wi-Fi" static 192.168.1.2

Secondary DNS:

netsh interface ip add dns name="Wi-Fi" 192.168.1.1index=2

If you want to change to use DHCP Server provided DNS do this:

netsh interface ip set dnsservers name="Wi-Fi" source=dhcp

Related Posts

Leave a Reply