Overview [1]#
MaxPageSize controls the maximum number of objects that are returned in a single search result, independent of how large each returned object is.MaxPageSize is part of the LDAP policy in Active Directory that is revealed in the supportedLDAPPolicies attribute in the RootDSE.
MaxPageSize in Windows Server 2008 and Windows Server 2008 R2 has a Hardcoded limit of 20,000 which overrides the LDAP policy in Active Directory setting when the policy value should be higher.
MaxPageSize in Windows Server 2008 and Windows Server 2008 R2 has a Hardcoded limit which override LDAP policy in Active Directory setting when the policy value should be higher.
Overcoming MaxPageSize#
MaxPageSize when exceeded will result in the LDAP Result Code LDAP_ADMINLIMIT_EXCEEDED from the SearchRequest. Microsofts recommendation is to use the Simple Paged Results ControlChanging the MaxPageSize Value #
The value is stored in the LDAP policy in Active Directory. You can change the value with Ntdsutil.exeThe value is "hardcoded" in 2008/2008 R2. However the dSHeuristic attribute could be set to control the value.[3]
Overcoming the MaxPageSize Value #
Using the Simple Paged Results Control can help with the retrieval of entries beyond the MaxPageSize value.More Information #
There might be more information for this subject on one of the following:- LDAP policy in Active Directory
- MaxPageSize
- Maximum Database Record Size
- Microsoft Active Directory Anomalies
- Ntdsutil.exe
- Simple Paged Results Control
- [#1] - LDAP Policies
- based on information retrieved 2013-08-12
- [#2] - Windows Server 2008 domain controller returns only 5000
- based on information retrieved 2013-08-12
- [#3] - Override the hardcoded LDAP Query limits introduced in Windows Server 2008 and Windows Server 2008 R2
- based on information retrieved 2013-08-12