In Need of a WINS Script...

We have configured one of our servers with the role of a WINS server.  We want to configure all of the PC's in the company with the IP address of that server under the WINS tab of TCP/IP properties.  I am in need of a script that I can push out to those machines that will do this for me without having to touch each of them individually.  The address of that server is 10.1.1.60.
LVL 1
redvipergtsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sirbountyCommented:
0
tegmine_itCommented:
Try this VBS
' From the book "Windows Server 2003 Networking Recipes"
 
' This code configures two WINS servers
' ------ SCRIPT CONFIGURATION ------
strComputer = "."
strWins1 = "192.168.1.151"
strWins2 = "192.168.1.152"
' --------- END CONFIGURATION ------
 
Set objWMIService = GetObject("winmgmts:" _
 & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set nics = objWMIService.ExecQuery _
 ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
 
For Each nic In nics
  intSetWINS = nic.SetWINSServer(strWINS1, strWINS2)
  If intSetWINSServer = 0 Then
    WScript.Echo "Success! WINS servers configured."
  ElseIf intSetWINSServer = 1 Then
    WScript.Echo "WINS servers configured, please reboot."
  Else
    WScript.Echo "Error!! Unable to configure WINS servers."
  End If
Next

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RobSilverCommented:
You could use PSExec in conjunction with NetSH.  However, you might want to just remove WINS and replace it with GNZ as follows:

http://robsilver.org/misc/why-wins-will-be-here-for-some-time-or-not/

Regards,

Rob
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.