Software >> OS >> Windows >> API >> ADSI >> Perl >>  How to list group objects in particular OU in a particular domain

use Win32::OLE; use Win32::OLE qw( in ); $oContainer = Win32::OLE->GetObject("LDAP://OU=Postgrad,OU=Distribution List,DC=student,DC=main,DC=somecollege,DC=edu"); $oContainer->{Filter} = ["group"]; foreach $oGroup (in $oContainer) { $var = $oGroup->{'Name'}; print $var . "\n"; }