- Thread Author
- #1
Hi All
Wondering if anyone knows a command to remove the DNS entries within the advanced TCP/IP settings?
The primary and secondary DNS IP need to be changed with the tertiary and quaternary DNS IP. Simple enough doing it manually but there's over 50 VMs this needs to be done on so i'm trying to write a script for this.
i did try to the below command but as the IPs are already added it wouldn't re-arrange them into the given order
e.g. (IPs have been randomised)
netsh dnsclient add dnsserver "Local Area Connection" 10.91.201.56 1
netsh dnsclient add dnsserver "Local Area Connection" 10.91.201.57 2
netsh dnsclient add dnsserver "Local Area Connection" 10.91.207.55 3
netsh dnsclient add dnsserver "Local Area Connection" 10.91.207.54 4
Any help is greatly appreciated - thanks
Wondering if anyone knows a command to remove the DNS entries within the advanced TCP/IP settings?
The primary and secondary DNS IP need to be changed with the tertiary and quaternary DNS IP. Simple enough doing it manually but there's over 50 VMs this needs to be done on so i'm trying to write a script for this.
i did try to the below command but as the IPs are already added it wouldn't re-arrange them into the given order
e.g. (IPs have been randomised)
netsh dnsclient add dnsserver "Local Area Connection" 10.91.201.56 1
netsh dnsclient add dnsserver "Local Area Connection" 10.91.201.57 2
netsh dnsclient add dnsserver "Local Area Connection" 10.91.207.55 3
netsh dnsclient add dnsserver "Local Area Connection" 10.91.207.54 4
Any help is greatly appreciated - thanks