how can I use netsh to remotely set and add multiple DNS server addresses
- From: jorgemgonz@xxxxxxxxx
- Date: 19 Aug 2006 15:52:26 -0700
Can someone help me with how to use netsh to set and add multiple DNS
server addresses to remote PCs that are running Windows XP and Windows
98.
I have created a batch file (.bat) with the following entries:
netsh interface ip set dns name="Local Area Connection" static
192.168.1.1
netsh interface ip add dns name="Local Area Connection" 192.168.1.230
This works fine, changes the DNS entries on the local PC when logged in
as the Administrator. How can I make this work when a standard USER is
logged in?
My preference would be to take input from a .txt file with many IP
addresses (pcs.txt) and run the "netsh interface ip add dns" command
within a .bat in order to update the DNS entries.
This is what I have used before to run other commands on remote systms.
"for /f %%i in (pcs.txt) do uptime \\%%i >> uptimes1.csv"
So I tried to place the line below in a .bat
"for /f %%i in (pcs.txt) do netsh interface ip set dns name="Local Area
Connection" static 192.168.1.1 \\%%i"
This yielded ERROR------> \\192.168.1.110 is not an acceptable value
for register
I realize I can do this with a GPO which would include a Startup
script, but these systems are not part of a AD Domain.
Can someone help please?
Thanks in advance for your help - Jorge
.
- Prev by Date: Re: All Users directory missing from Documents and Folders
- Next by Date: execute vbs file from asp page
- Previous by thread: All Users directory missing from Documents and Folders
- Next by thread: execute vbs file from asp page
- Index(es):
Relevant Pages
|