use strict; use warnings; use Win32::OLE 'in'; use Data::Dumper::Simple; my $ADsPath = "LDAP://CN=users,DC=woodland,DC=wednet,DC=edu"; my $adsobj = Win32::OLE->GetObject("$ADsPath") or die "Unable to retrieve the object for ADsPath\n"; warn Dumper($adsobj); foreach my $adsobj_child (in $adsobj) { if (($adsobj_child->{Class} eq "group") && ($adsobj_child->{samaccountname} eq "Domain Admins")) { warn Dumper($adsobj_child->{member}); my @array = $adsobj_child->{member}; foreach (@array) { print "$_\n"; } } }