HOW TO: Modify the MaxQueryDuration Setting for Active Directory Services Interface

Support for Windows Server 2003 ended on July 14, 2015

Microsoft ended support for Windows Server 2003 on July 14, 2015. This change has affected your software updates and security options. Learn what this means for you and how to stay protected.

This article describes how to modify the query policy setting for MaxQueryDuration (maximum query duration).After two minutes, the Active Directory Services Interface (ADSI) queries to Active Directory can stop responding. This behavior can be caused by the MaxQueryDuration setting, which has a default time of two minutes. This value, however, can be changed by using the Ntdsutil.exe utility.

back to the top

Increase MaxQueryDuration Using Ntdsutil.exe

You can use the Ntdsutil.exe utility to increase the default setting of MaxQueryDuration:
  1. At a command prompt, type: ntdsutil.
  2. At a command prompt, type: ldap policies, and then press ENTER.
  3. At a command prompt, type: connections, and then press ENTER.
  4. At a command prompt, type: connect to [your server name], and then press ENTER.
  5. At a command prompt, type: q, and then press ENTER to exit back to Lightweight Directory Access Protocol (LDAP) policies.
  6. To display the current values, at a command prompt, type: show values, and then press ENTER.
  7. To set MaxQueryDuration, at a command prompt, type:set maxqueryduration to [number of seconds wanted], and then press ENTER.
  8. At the prompt type: commit changes.
  9. To exit, at a command prompt, type: q, press ENTER, type: q, and then press ENTER.
back to the top

Article ID: 291438 - Last Review: 06/10/2016 16:02:00 - Revision: 4.4

Windows Server 2012 R2 Datacenter, Windows Server 2012 R2 Standard, Windows Server 2012 Datacenter, Windows Server 2012 Standard, Windows Server 2008 R2 Datacenter, Windows Server 2008 R2 Standard, Windows Server 2008 Datacenter, Windows Server 2008 Enterprise, Microsoft Windows Server 2003, Enterprise Edition (32-bit x86), Microsoft Windows Server 2003 R2 Enterprise x64 Edition

  • kbenv kbhowtomaster KB291438