After checking thru MSDN some more I found this, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/bas e/setservicebits.asp, and wondered if the 'type' key was a sum of all of these possibilities? If that's the case then it's reporting the services found and therefore all of my systems have the SV_TYPE_WORKSTATION bit set (typical MS logic). :P
Guess I'll shift to Win32::OLE and pull the info from WMI. Glenn -----Original Message----- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 12:46 PM To: 'Deans, Glenn'; '[EMAIL PROTECTED]' Subject: RE: Key values for Win32::Lanman::NetServerEnum? Oh, yeah, I forgot. That one returns all computers that are running the workstation service... I suppose you could do a SV_TYPE_NT and then a SV_TYPE_SERVER_NT and only keep those that didn't show up in the servers... -----Original Message----- From: Deans, Glenn [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 7:33 AM To: '[EMAIL PROTECTED]' Subject: RE: Key values for Win32::Lanman::NetServerEnum? I've tried SV_TYPE_WORKSTATION, but I keep getting servers in the output like the one below. MSDN describes it as 'All Workstations' but that doesn't seem to be the case. Although the 'Type' value is different. version_major=4 comment=IB - BDC Urbana (File Server) platform_id=500 type=135699 version_minor=0 name=URB0001A Glenn -----Original Message----- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 10:16 AM To: 'Deans, Glenn'; '[EMAIL PROTECTED]' Subject: RE: Key values for Win32::Lanman::NetServerEnum? Actually, I think you can get what you want just by changing SV_TYPE_NT to SV_TYPE_WORKSTATION_NT. I'm not 100% solid on my SV_TYPE* constants, you could try doing a search on msdn.microsoft.com, and you should be able to find a list of them, SV_TYPE_NT SV_TYPE_SERVER_NT and there is one for SQL servers and I think Exchange servers as well. -----Original Message----- From: Deans, Glenn [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 6:44 AM To: '[EMAIL PROTECTED]' Subject: Key values for Win32::Lanman::NetServerEnum? I'm trying to find a *simple* way to enumerate just the workstations in my NT domain (NT4 and W2K Pro systems only). In Lanman and AdminMisc I seem to be able to find servers and various flavors of them easily but not just the workstations. I was enumerating the domain and checking the registry but I'd like to eliminate the 2 step process there. I'm using ActivePerl build 633 and was noodling around with Win32::Lanman::NetServerEnum which looks promising. The keys enumerate as follows but I can't find a reference for what the values are or what they describe. It looks as if the type key could be parsed for workstations, but I'm not sure. Any ideas? version_major=5 comment=Bruderer #4 platform_id=500 type=69635 version_minor=0 name=URBDC06C ==<< Sample code >>== use Win32::Lanman; if(!Win32::Lanman::NetServerEnum("\\\\myPDC", "myDomain", SV_TYPE_NT, \@info)) { print "Sorry, something went wrong; error: "; # get the error code print Win32::Lanman::GetLastError(); exit 1; } foreach $server (@info) { @keys = keys %$server; foreach $key(@keys) { print "$key=${$server}{$key}\n"; } } ................................................................ Regards Glenn Deans "It's not what you look at that matters, it's what you see." Henry David Thoreau American Essayist and Poet -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]