Title: Discovering Servers on the Network
This works for me:
 
Win32::NetAdmin::GetServers($PDC, $domain, SV_TYPE_SERVER_NT, \@lis
 
-Jon
----- Original Message -----
 
Sent: Monday, October 21, 2002 3:48 PM
Subject: Discovering Servers on the Network

Ive written a script that goes out and tells me how many servers are running a particular service (for licensing purposes). I used to loop through an allservers.txt file, but Ive gotten tired of updating it as we add new servers (plus its possible I could miss a server or two).

Instead, Ive rewritten my script to use the NetAdmin module to generate a list of servers for me.

Win32::NetAdmin::GetServers('',$Domain,SV_TYPE_SERVER,\@List);

However, this returns all computers that are running the Server service... which includes several thousand XP machines. None of the workstations are running this particular service, so it doesnt skew my results. The script works, but it takes a good hour or two to run (since Im hitting every workstation in the domain with a service query, I only run this at night).

Is there anyway to return ONLY a list of actual Servers without hitting each and every machine (to check OS version number for instance). Where does GetServers get its information anyway?? From a Master Browser??

Any illumination would be most appreciated.

Ron Rosenkoetter

System Engineer

Server Administration & Management

Reply via email to