• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 565
  • Last Modified:

How do I find WINS server clients from WINS server?


I am looking for the way or script to find WINS server clients from WINS server.
Also need the script to change WINS server ip to those clients.

Let me know if my question is not clear to you.

Please reply asap.
1 Solution

Returns information about all the Windows Internet Name Service (WINS) reverse lookup records on a DNS server

strComputer = "."
Set objWMIService = GetObject("winmgmts:"  & "{impersonationLevel=impersonate}!\\" & strComputer &  "\root\MicrosoftDNS")

Set colItems = objWMIService.ExecQuery("Select * from MicrosoftDNS_WINSRType")

For Each objItem in colItems
    Wscript.Echo "Owner Name: " & objItem.OwnerName
    Wscript.Echo "Cache Timeout: " & objItem.CacheTimeout
    Wscript.Echo "Container Name: " & objItem.ContainerName
    Wscript.Echo "DNS Server Name: " & objItem.DnsServerName
    Wscript.Echo "Domain Name: " & objItem.DomainName
    Wscript.Echo "Lookup Timeout: " & objItem.LookupTimeout
    Wscript.Echo "Mapping Flag: " & objItem.MappingFlag
    Wscript.Echo "Record Class: " & objItem.RecordClass
    Wscript.Echo "Record Data: " & objItem.RecordData
    Wscript.Echo "Result Domain: " & objItem.ResultDomain
    Wscript.Echo "Text Representation: " & objItem.TextRepresentation
    Wscript.Echo "Timestamp: " & objItem.Timestamp
    Wscript.Echo "Time-to-Live: " & objItem.TTL

Sets the primary and secondary WINS server for a TCP/IP-bound network adapter.

On Error Resume Next

strComputer = "."
Set objWMIService = GetObject("winmgmts:"    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colNetCards = objWMIService.ExecQuery    ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")

For Each objNetCard in colNetCards
    strPrimaryServer = ""
    strSecondaryServer = ""
    objNetCard.SetWINSServer strPrimaryServer, strSecondaryServer

Well looking at active registrations in WINS is easy through the GUI... Launch WINS from Admin Tools, expand the server object, right click Active Registrations and Display Records.

Are you clients set up statically?  Or do they get IP addresses through DHCP - because you can set up a scope for a segment of your network, specifying whatever WINS and DNS servers get pushed to the clients...
Use the WINS Tool from Administrative Tools from the Server or install the AdminPak.msi on any client machine.  Connect to the proper WINS server and do a listing.
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

AZM1040Author Commented:
Sorry for the delay in reply.
For your information, I got the list of servers of where we need to update new WINS ip.

@ zsaurabh: your script doesnt work for me.

I need the working script to update New WINS ip to list of Servers.

this is very urgent.
Use the WINS Tool from Administrative Tools from the Server or install the AdminPak.msi on any client machine.  Connect to the proper WINS server and do a listing.
AZM1040Author Commented:
After some googling, I got one (see the attached) I modified it and tested but it is not updating the WINS primary Ip address.

Please review the attachments and please let me know what's the wrong in that.

@TravisT: thanks for your comments but I was asking about script.
AZM1040Author Commented:
I have figured it out my self. thanks for your all help
AZM1040Author Commented:

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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now