Solved

How do I find WINS server clients from WINS server?

Posted on 2010-08-19
8
500 Views
Last Modified: 2012-05-10
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.
0
Comment
Question by:AZM1040
8 Comments
 
LVL 2

Expert Comment

by:zsaurabh
ID: 33474540

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
      

0
 
LVL 2

Expert Comment

by:alro613
ID: 33474610
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...
0
 
LVL 2

Expert Comment

by:TravisT
ID: 33475930
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.
0
 

Author Comment

by:AZM1040
ID: 33488891
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.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 2

Expert Comment

by:TravisT
ID: 33488932
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.
0
 

Accepted Solution

by:
AZM1040 earned 0 total points
ID: 33489195
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.
WinsChange.log
Error.bmp
WinsChangedIP.txt
0
 

Author Comment

by:AZM1040
ID: 33493168
I have figured it out my self. thanks for your all help
0
 

Author Comment

by:AZM1040
ID: 33493177
thx
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The HP utility "HP Lights-Out Online Configuration Utility for Windows Server 2003/2008" could be of great use when it comes to remotely configure a HP servers ILO WITHOUT rebooting the server. We would only need to create and run scripts using thi…
This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now