Solved

How do I find WINS server clients from WINS server?

Posted on 2010-08-19
8
538 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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
 
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 Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Way to setup network drive share permanently mapped to server 3 84
MS Endpoint Protection 2 70
How to decline Windows updates with SCCM? 2 49
NTP time source for DC 3 41
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Learn about cloud computing and its benefits for small business owners.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

679 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