Submitted By: Anonymous Submission

Sets or changes the DNS Server of the named Ethernet connection (for example, Local Area Connection). Script can be run using PSTools PSEXEC ("\psexec.exe @DNSServers.txt -c -s change_dns.bat"). Great for changing DNS settings on multiple servers.

Visual Basic
Edit|Remove
netsh interface ip set dns "Local Area Connection" static 10.1.4.106 	(Set to your Primary DNS Server)
netsh interface ip add dns "Local Area Connection" 10.254.4.7		(Set to your Secondary DNS Server)
netsh interface ip set wins "Local Area Connection" static 10.1.4.106	(Optional..Set to WINS Server)