Must set it at least to 1000. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Dutrieux Yves Sent: Tuesday, April 26, 2011 10:32 AM To: Gomes, Rich; [email protected] Subject: RE: AD Page Size help
Hi, I think you must increase limit size in ad object. In MMC, this settings is under menu : Display - Filter options - maximum number of item displayed by folder. Yves -----Message d'origine----- De : [email protected] [mailto:[email protected]] De la part de Gomes, Rich Envoyé : mardi 26 avril 2011 17:24 À : [email protected] Objet : RE: AD Page Size help So, a lot of people have given some great suggestions but I am still unable to get this to work and am still confused. The nearest I have been able to come is to create an array with the different OU's that contain users within our domain. Anything without the array (just looking at the entire domain all at once) throws the error below. Using the array works but it seems pretty hackey. Plus I will need to always be sure I have every OU that contains users in it at all times. I really wanted this to be an exercise in understanding the code. Why does this work with the array but not without? OLE exception from "Provider": The size limit for this request was exceeded. Win32::OLE(0.1709) error 0x80072023: "The size limit for this request was exceeded" in METHOD/PROPERTYGET "MoveNext" Thanks, Rich -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Joachim Thuau Sent: Friday, April 22, 2011 6:45 PM To: [email protected] Subject: RE: AD Page Size help I have had issues in the past where searching with a "null base" inside AD yielded errors, but putting one level of OU in the base made it work. (the first time I encountered that, it was with AD integration with apache). Maybe adjusting the base will yield different results. Thanks, Jok > -----Original Message----- > From: [email protected] [mailto:perl- > [email protected]] On Behalf Of Gomes, Rich > Sent: Thursday, April 21, 2011 8:18 AM > To: [email protected] > Subject: AD Page Size help > > 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 _______________________________________________ Perl-Win32-Admin mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Admin mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ====== DISCLAIMER ====== <html><BR><BR><A href="http://www.cph.be/maildisclaimer">http://www.cph.be/maildisclaimer</A></html> _______________________________________________ Perl-Win32-Admin mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Admin mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
