Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add more than two wins servers with WMI

Status
Not open for further replies.

sergeys

MIS
May 22, 2007
55
0
0
US
Hi everybody!

I am trying to query a workstation for it's configured wins servers. Win32_NetworkAdapterConfiguration only has WINSPrimaryServer and WINSSecondary server, both of which are string values. My target workstation has some 10 wins servers configured. How can I query for those?

Also, when I have to add an additional wins server address, the SetWINSServer method can set primary or secondary addresses, but how do I add more?

Any help is appreciated.
Thanks.
 
I took a look at WMI CIM Studio and it looks like those are the only entries you can edit directly.

For a more indirect method, you can acquire the interface GUID using WMI and then read/write the WINS setting from the registry. The 'SettingID' property of the NIC in WMI is the same as the GUID of the NIC which is stored in the registry.

The setting for WINS is a REG_MULTI_SZ stored at:
HKLM\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\Interfaces\Tcpip_<GUID>\NameServerList

You can hook that registry entry through WMI or the Shell object depending on where the script is being executed from.

Good Luck!

PSC

Governments and corporations need people like you and me. We are samurai. The keyboard cowboys. And all those other people out there who have no idea what's going on are the cattle. Mooo! --Mr. The Plague, from the movie "Hackers
 
workstation has some 10 wins servers configured
Really ?
 
Thanks, PScottC, I guess we will have to go through the registry, after all.
It does seem a little odd though, that there is no way to work with those via WMI.

Thanks for your help.
 
I'm actually not surprised. I've never heard of anyone using more than 2. In fact, most of the networks that I have worked on in the last 2-3 years have not had any WINS at all.

Good Luck!

PSC

Governments and corporations need people like you and me. We are samurai. The keyboard cowboys. And all those other people out there who have no idea what's going on are the cattle. Mooo! --Mr. The Plague, from the movie "Hackers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top