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]