I’ve 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 I’ve gotten tired of updating it as we add new servers (plus it’s possible I could miss a server or two).
Instead, I’ve 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 doesn’t skew my results. The script works, but it takes a good hour or two to run (since I’m 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.
System Engineer
Server Administration & Management
