Maximum size of Active Directory searches: registry value QueryLimitUserHKCU\Software\Policies\Microsoft\Windows\Directory UI
- Policy ID
- AD_QueryLimit
- Scope
- User Configuration
- Supported on
- At least Windows 2000
- Source
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
- Category
- Desktop › Active Directory
Registry
QueryLimit
REG_DWORDUser- Enabled value
- Depends on the option value
- Element
- Number of objects returned:
- Value type
- REG_DWORD
- Required
- true
- Maximum value
- 4000000000
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Directory UI] ; Value names and types follow the ADMX. Replace <enter value> below with your own data "QueryLimit"=dword:<enter value>
CMD
:: Value names and types follow the ADMX. Replace <enter value> below with your own data reg add "HKCU\Software\Policies\Microsoft\Windows\Directory UI" /v "QueryLimit" /t REG_DWORD /d "<enter value>" /f
PowerShell
# Value names and types follow the ADMX. Replace <enter value> below with your own data New-Item -Path 'HKCU:\Software\Policies\Microsoft\Windows\Directory UI' -Force | Out-Null New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\Directory UI' -Name 'QueryLimit' -PropertyType DWord -Value '<enter value>' -Force | Out-Null