Networking Forums

Networking Forums > Computer Networking > Windows Networking > Need script to change DNS and WINS settings on 50 servers

Reply
Thread Tools Display Modes

Need script to change DNS and WINS settings on 50 servers

 
 
Spin
Guest
Posts: n/a

 
      11-04-2005, 04:08 PM
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)?

--
Spin



 
Reply With Quote
 
 
 
 
Neteng
Guest
Posts: n/a

 
      11-04-2005, 04:33 PM
The one place you did not cross post too is the place you should be looking-
microsoft.public.windows.server.scripting

"Spin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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)?
>
> --
> Spin
>
>
>



 
Reply With Quote
 
Miha Pihler [MVP]
Guest
Posts: n/a

 
      11-04-2005, 08:11 PM
Are these servers members of e.g. Active Directory domain? If yes, you can
use Group Policy to _set_ new DNS and WINS settings...

--
Mike
Microsoft MVP - Windows Security

"Spin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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)?
>
> --
> Spin
>
>
>



 
Reply With Quote
 
Ulf B. Simon-Weidner [MVP]
Guest
Posts: n/a

 
      11-04-2005, 10:33 PM
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
 
Reply With Quote
 
Kerry Brown
Guest
Posts: n/a

 
      11-05-2005, 02:25 PM
"Spin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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)?
>


Check out the script center

http://www.microsoft.com/technet/scr...s/default.mspx

Kerry


 
Reply With Quote
 
Joe Morris
Guest
Posts: n/a

 
      11-07-2005, 12:31 PM
"Spin" <(E-Mail Removed)> writes:

>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
--
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
script to change the static IP address Ezakial Windows Networking 2 09-14-2009 06:25 PM
Script to change Domain S Lane Windows Networking 2 03-20-2006 01:50 PM
Change IP on DC w/DNS and Wins? =?Utf-8?B?and5ZGVy?= Windows Networking 5 08-16-2004 07:01 PM
Script to change dns settings dsmcd Windows Networking 0 01-30-2004 10:52 PM
automatically re-run firewall script on IP addr change David Efflandt Linux Networking 4 12-26-2003 09:20 PM



1 2 3 4 5 6 7 8 9 10 11