|
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)
{
$name = $oGroup->{'Name'};
print "Name=$name\n";
}
foreach $oGroup (in $oContainer)
{
$oMembers = $oGroup->{'Members'};
foreach $oMember (in $oMembers)
{
print $oMember->{"Name"} . "\n";
}
}
|
|