Friday, July 28, 2017

View and Change Active Directory MaxPageSize

 
MaxPageSize - This value controls the maximum number of objects that are returned in a single search result, independent of how large each returned object is. To perform a search where the result might exceed this number of objects, the client must specify the paged search control. This is to group the returned results in groups that are no larger than the MaxPageSize value. To summarize, MaxPageSize controls the number of objects that are returned in a single search result.
Default value: 1,000
 
Some LDAP clients can only receive the first 1,000 results when they make an LDAP question to Active Directory, when more results be that requite the query scope. If there are 2,000 results to be returned, the client will receive the “Size Limit Exceeded” error when the paging is not enabled or not present.
 
How we can view or change MaxPageSize value?
 
 
Open ntdsutil
 
 

 To view policy settings

 
1. At the Ntdsutil.exe command prompt, type LDAP policies
ntdsutil: LDAP policies
 

2. At the LDAP policy command prompt, type connections
ldap policy: connections
 
 
3. At the server connection command prompt, type connect to server <DNS name of server>
server connections: connect to server <DNS name of server>
 
 
Binding to <DNS name of server> ...
Connected to <DNS name of server> using credentials of locally logged on user.
4. At the server connection command prompt, type q
server connections: q
 
 
5. At the LDAP policy command prompt, type Show Values
ldap policy: show values
 
 
 
 

To change policy settings


1. At the LDAP policy command prompt, type
ldap policy: Set MaxPageSize to 2000
 
 
We can use the Show Values command to verify changes.
 
 
2. To save the changes, use Commit Changes at the LDAP policy command prompt
ldap policy: commit changes
 
3. For return enter q
ldap policy: q
 
4. To quit Ntdsutil.exe, at the command prompt, enter q.
ntdsutil: q
 
 

 
Note: If you change the values for the query policy that a domain controller is currently using, those changes take effect without a reboot.
 
 
 

3 comments:

  1. Anonymous13/3/20 06:15

    Thank you!

    ReplyDelete
  2. Thank you very much, very helpful step by step process. From the Microsoft article I simply missed the 'q' to get back to the previous menu after connecting to the DC.

    ReplyDelete