I know this has been talked about a lot but I cannot seem to get my script to 
work.
I am trying to not hit the LDAP search limit but cannot seem to get the 
PageSize line correct


Any thoughts?


_____________________________________________________________________________

my $strDomainDN = "DC=mydomain,DC=com";    
use Win32::OLE qw(in);


$Win32::OLE::Warn = 3;
my $strBase   =  "<LDAP://" . $strDomainDN . ">;";


my $strFilter = "(&(objectclass=user)(objectcategory=person));";
my $strAttrs  = "name;";
my $strAttrs  = "distinguishedName;";
my $strScope  = "subtree";

my $objConn = Win32::OLE->CreateObject("ADODB.Connection");
$objConn->{Provider} = "ADsDSOObject";
$objConn->Open;

$objConn->{Properties}->{"Page Size"} = 100;

my $objRS = $objConn->Execute($strBase . $strFilter . $strAttrs . $strScope);
$objRS->MoveFirst;
while (not $objRS->EOF) {
    print $objRS->Fields(0)->Value,"\n";
    $objRS->MoveNext;
}

_______________________________________________________________________________



_______________________________________________
Perl-Win32-Admin mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to