Solved

How do I find WINS server clients from WINS server?

Posted on 2010-08-19
8
518 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

770 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