Link to home
Start Free TrialLog in
Avatar of AZM1040
AZM1040Flag for United States of America

asked on

How do I find WINS server clients from WINS server?

Hi,

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.
Avatar of zsaurabh
zsaurabh
Flag of United States of America image


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
    Wscript.Echo
Next
      


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 = "192.168.1.100"
    strSecondaryServer = "192.168.1.200"
    objNetCard.SetWINSServer strPrimaryServer, strSecondaryServer
Next
      

Avatar of alro613
alro613

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.
Avatar of AZM1040

ASKER

Guys,
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.
ASKER CERTIFIED SOLUTION
Avatar of AZM1040
AZM1040
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AZM1040

ASKER

I have figured it out my self. thanks for your all help
Avatar of AZM1040

ASKER

thx