Information Technology Reference
In-Depth Information
Using a Command-Line Interface
The following command configures two WINS servers for the NIC associated with a connection
named Local Area Connection . Change the name of the connection and the IP addresses of the
WINS servers as necessary for your environment.
> netsh interface ip set wins name = "Local Area Connection"
source = static addr = 192.168.1.151
> netsh interface ip add wins name = "Local Area Connection"
addr = 192.168.1.152
Note Using add wins here will append the second WINS server to the end of the WINS search order. Just
like with add dns , you can use index = x to insert a new server at a specific location in the search order
(see Recipe 1-10).
Using the Registry
To configure one or more WINS servers for a particular NIC, set the following Registry value.
You can enter multiple IP addresses separated by pressing the Enter key:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
NetBT\Parameters\Interfaces\Tcp_ {<Interface GUID>} \]
"NameServerList"=reg_multi_sz:" <IP Address> "
To remove an existing WINS server, delete the corresponding IP address from this key.
WINS servers are queried in the order in which they're listed in this key, so you can move them
around within the key as necessary to change the search order.
Using VBScript
This code configures two WINS servers for the local computer. To customize this code for your
environment, simply change the values in strWins1 and strWins2 .
' ------ 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."
Search WWH ::




Custom Search