Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

In Need of a WINS Script...

Posted on 2008-11-18
3
Medium Priority
?
656 Views
Last Modified: 2012-05-05
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.
0
Comment
Question by:redvipergts
3 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 22985151
0
 
LVL 5

Accepted Solution

by:
tegmine_it earned 1500 total points
ID: 23255197
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
 
LVL 7

Expert Comment

by:RobSilver
ID: 33268536
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question