Need script to change DNS and WINS settings on 50 servers

S

Spin

Gurus,

I have to check like 50 servers this weekend to see if they all have new DNS
and WINS settings applied to them. Onerous task. Is there a script someone
has which, given a list of machines to work against, it will output the DNS
and WINS settings on each (and hopefully even change them to something I
want)?
 
M

Miha Pihler [MVP]

Are these servers members of e.g. Active Directory domain? If yes, you can
use Group Policy to _set_ new DNS and WINS settings...
 
U

Ulf B. Simon-Weidner [MVP]

Miha Pihler [MVP] says...
Are these servers members of e.g. Active Directory domain? If yes, you can
use Group Policy to _set_ new DNS and WINS settings...

DNS yes, WINS no.

WINS is a bit tricky to do with a script - but it's still fairly fast written.
I've done a script to do this.

The important stuff is to remotely access the registry, then check the
bindings, check which network interface is configured, check where a WINS is
configured. Then you are able to change the WINS server.

The issue why you have to check the bindings is that the configuration is
"hidden" in the registry behind the adapters GUID.

I'd love to share my script, however I wrote it when I was working at a
customer so I'm not allowed to publish it without completely rewriting it.
Sorry about that, but following my explaination above this is fairly easy.

--
Gruesse - Sincerely,

Ulf B. Simon-Weidner

MVP-Book "Windows XP - Die Expertentipps": http://tinyurl.com/44zcz
Weblog: http://msmvps.org/UlfBSimonWeidner
Website: http://www.windowsserverfaq.org
 
J

Joe Morris

Spin said:
I have to check like 50 servers this weekend to see if they all have new DNS
and WINS settings applied to them. Onerous task. Is there a script someone
has which, given a list of machines to work against, it will output the DNS
and WINS settings on each (and hopefully even change them to something I
want)?

Are all of the servers using the same network configuration, and in
particular with the same name for the network interface (e.g.,
"Local Area Connection")?

If so, try this:

Configure one machine's network parameters manually.
On that machine, open a DOS box and enter the command:

netsh interface dump > c:\foo.txt

Now use a logon script (or whatever you prefer) on each of the other
machines copy "foo.txt" to the root of the C: disk (or wherever you
want) and issue the command

netsh < c:\foo.txt

(Be careful to wait until you see the "C:\>" command prompt. There will
be several intermediate prompts of the form "netsh interface>" as the
script is processed.)

Now...you may need to tweak the file a bit depending on what you've got
in the machines and how it's configured but it should be able to do
what you want.

Joe Morris
--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top