Try Win32::AdminMisc::GetMachines(). For more info check out http://www.roth.net/perl/adminmisc. This will query a domain controller for machines that are in the domain.
Or if you want to use Win32::NetAdmin, use Win32::NetAdmin::GetUsers($domaincontroller,FILTER_WORKSTATION_TRUST_ACCOUNT |FILTER_SERVER_TRUST_ACCOUNT,\@machines); The difference is that the Win32::NetAdmin::GetServers() function queries the master browser instead of the domain controller. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 9:00 AM To: [EMAIL PROTECTED] Subject: Workgroup/Domain Members Does someone know how to list hosts that are in a given domain? One of our domain names is the same as a work group name. Running the following appears to give a the name of a host that is in either workgroup $Domain or domain $Domain. my $Type = SV_TYPE_ALL | SV_TYPE_WINDOWS | SV_TYPE_NT; if ( Win32::NetAdmin::GetServers( '',$Domain,$Type,\@List) ) { print "\nAt ".__LINE__." \$Domain=<$Domain>\n"; etc ... Help/Advice would be appreciated. Thanks, Ken Stephani Unicenter TNG, Intranet Support Computer Sciences Corporation For BAE SYSTEMS 858-675-1974 (Office Phone) 858-232-6421 (Cellular Phone) NOTE: For AHD Reports/Queries, visit webster -> organizations -> information technology -> it operating committee information center -> -> csr/problem report status For BOS/RRS Reports/Queries, visit webster -> organizations -> information technology -> it operating committee information center -> -> BackOfficeServices/RemoteResolutionServices For Unicenter TNG/AMO/SDO Information/Status, visit webster -> organizations -> information technology -> computer services -> unicentertng _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin -------------------------------------------------------------------------------- This email may contain confidential and privileged material for the sole use of the intended recipient. If you are not the intended recipient, please contact the sender and delete all copies. _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
