Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Netsh WINS example

Updated: January 21, 2005

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Netsh WINS example

You can use Netsh commands for Windows Internet Name Service (WINS) in batch files and other scripts to automate tasks. The following example batch file demonstrates how to use Netsh commands for WINS to perform a variety of related tasks.

In this example procedure, WINS-A is a WINS server with the IP address and WINS-B is a WINS server with the IP address The procedure adds a dynamic name record with IP address, MY_RECORD [04h], to WINS-A, sets WINS-B as a push/pull replication partner of WINS-A, connects to WINS-B, and then sets WINS-A as a push/pull replication partner of WINS-B. Next the procedure initiates a push replication from WINS-A to WINS-B, and then connects to WINS-B to verify that the new record, MY_RECORD, was replicated successfully.

For more information, see WINS Replication, NetBIOS names reference, and Configure Replication.

For a complete list of Netsh commands for WINS, see Netsh commands for WINS.

In the following example procedure, lines that contain comments are preceded by "rem," for remark. Netsh ignores comments.

rem two WINS servers:
rem (WINS-A)
rem (WINS-B)

rem 1. Connect to (WINS-A), and add the dynamic name MY_RECORD [04h] to the (WINS-A) database.
netsh wins server add name Name=MY_RECORD EndChar=04 IP={}

rem 2. Connect to (WINS-A), and set (WINS-B) as a push/pull replication partner of (WINS-A).
netsh wins server add partner Server= Type=2

rem 3. Connect to (WINS-B), and set (WINS-A) as a push/pull replication partner of (WINS-B).
netsh wins server add partner Server= Type=2

rem 4. Connect back to (WINS-A), and initiate a push replication to (WINS-B).
netsh wins server init push Server= PropReq=0

rem 5. Connect to (WINS-B), and check that the record MY_RECORD [04h] was replicated successfully.
netsh wins server show name Name=MY_RECORD EndChar=04

rem 6. End example batch file.

The following table lists the netsh wins commands that are used in this example procedure.


Command Description


Shifts the current WINS command-line context to the server specified by either its name or IP address.

add name

Registers a name to the server.

add partner

Adds a replication partner to the server.

init push

Initiates and sends a push trigger to a WINS server.

show name

Displays detailed information for a particular record in the WINS server database.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft