Open in the explorer

Maximum size of Active Directory searches

Taille maximale des recherches dans Active Directory

Type
User
GPO path
User Configuration › Policies › Administrative Templates › Desktop › Active Directory FR: Configuration utilisateur › Stratégies › Modèles d'administration › Bureau › Active Directory
Supported on
At least Windows 2000 FR: Au minimum Windows 2000
ADMX file
Desktop.admx
Internal name
Desktop/AD_QueryLimit

Explanation

Specifies the maximum number of objects the system displays in response to a command to browse or search Active Directory. This setting affects all browse displays associated with Active Directory, such as those in Local Users and Groups, Active Directory Users and Computers, and dialog boxes used to set permissions for user or group objects in Active Directory.

If you enable this setting, you can use the "Number of objects returned" box to limit returns from an Active Directory search.

If you disable this setting or do not configure it, the system displays up to 10,000 objects. This consumes approximately 2 MB of memory or disk space.

This setting is designed to protect the network and the domain controller from the effect of expansive searches.

French text from Windows 11 26H2

Spécifie le nombre maximal d’objets que le système affiche en réponse à une commande d’exploration ou de recherche dans Active Directory. Ce paramètre affecte tous les affichages d’exploration associés à Active Directory, tels que ceux des composants Utilisateurs et groupes locaux et Utilisateurs et ordinateurs Active Directory, ainsi que les boîtes de dialogue utilisées pour définir les autorisations sur les objets Utilisateur ou Groupe dans Active Directory.

Si vous activez ce paramètre, vous pouvez utiliser la case « Nombre d’objets renvoyés » pour limiter la réponse aux recherches dans Active Directory.

Si vous désactivez ce paramètre ou ne le configurez pas, le système affiche jusqu’à 10 000 objets. Ceci consomme environ 2 Mo de mémoire ou d’espace disque.

Ce paramètre est conçu pour protéger le réseau et le contrôleur de domaine des effets qu’auraient des recherches trop vastes.

Registry

HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Directory UI
Value name
not defined in the ADMX

Enable / disable values: not defined in the ADMX (see the options below).

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: Desktop/AD_QueryLimit
$k = 'HKCU:\Software\Policies\Microsoft\Windows\Directory UI'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Number of objects returned
Set-ItemProperty -Path $k -Name 'QueryLimit' -Value 10000 -Type DWord  # maximum 4000000000

Disable

# Disable: Desktop/AD_QueryLimit
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": Desktop/AD_QueryLimit
$k = 'HKCU:\Software\Policies\Microsoft\Windows\Directory UI'
Remove-ItemProperty -Path $k -Name 'QueryLimit' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Number of objects returned:Nombre d’objets renvoyés :AD_QueryLimit_BoxNumeric boxdecimalQueryLimitREG_DWORD
Required · Max: 4000000000 · Default (UI): 10000

Availability