Trying to make a batch file script to change the DNS on a workstation.

H

Hozzybear

I have tried just putting the command in a batch file and running that batch file as admin, but that doesn't work.I need it to run as elevated cmd.The code I have used in an elevated cmd that works:netsh interface ipv4 add dns "Ethernet" 10.100.0.11 index=2 I would like to be able to run an ipconfig /all, then select between the two netsh commands below.Then run ipconfig /all again to verify the change.netsh interface ipv4 add dns "Ethernet" 10.100.0.11 index=2 netsh interface ipv4 add dns "Ethernet 2" 10.100.0.11 index=2

Continue reading...
 
Back
Top Bottom