I'm trying to change DNS entries and orders on multiple servers. Below is my syntax.
psexec \\%e% -u myuser -p mypassword -f changedns.bat
Here is what changedns.bat says, and it is in my path:
@echo on
netsh interface ip delete dns name="Local Area Connection" addr=all
netsh interface ip add dns "local area connection" addr=172.24.20.56 index=1
netsh interface ip add dns "local area connection" addr=172.16.1.25 index=2
pause
without the spaces and line wrap.
When I execute it, I get a script window that launches and disappears. Any ideas?
Thanks in advance.
psexec \\%e% -u myuser -p mypassword -f changedns.bat
Here is what changedns.bat says, and it is in my path:
@echo on
netsh interface ip delete dns name="Local Area Connection" addr=all
netsh interface ip add dns "local area connection" addr=172.24.20.56 index=1
netsh interface ip add dns "local area connection" addr=172.16.1.25 index=2
pause
without the spaces and line wrap.
When I execute it, I get a script window that launches and disappears. Any ideas?
Thanks in advance.
Comment