Open in the explorer

Enumerate administrator accounts on elevation

Énumérer les comptes d’administrateur aux privilèges élevés

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Credential User Interface FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Interface utilisateur d’informations d’identification
Supported on
At least Windows Vista FR: Au minimum Windows Vista
ADMX file
CredUI.admx
Internal name
CredUI/EnumerateAdministrators

Explanation

This policy setting controls whether administrator accounts are displayed when a user attempts to elevate a running application. By default, administrator accounts are not displayed when the user attempts to elevate a running application.

If you enable this policy setting, all local administrator accounts on the PC will be displayed so the user can choose one and enter the correct password.

If you disable this policy setting, users will always be required to type a user name and password to elevate.

French text from Windows 11 26H2

Ce paramètre de stratégie détermine si les comptes Administrateur s’affichent lorsqu’un utilisateur tente d’élever une application en cours d’exécution. Par défaut, les comptes Administrateur ne s’affichent pas lorsque l’utilisateur tente d’élever une application en cours d’exécution.

Si vous activez ce paramètre de stratégie, tous les comptes Administrateur locaux de cet ordinateur s’affichent pour permettre à l’utilisateur d’en choisir un et d’entrer le mot de passe correspondant.

Si vous désactivez ce paramètre de stratégie, les utilisateurs devront toujours entrer un nom d’utilisateur et un mot de passe pour avoir des privilèges élevés.

Registry

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\CredUI
Value name
EnumerateAdministrators
StateValue written
EnabledREG_DWORD = 1
DisabledREG_DWORD = 0

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: CredUI/EnumerateAdministrators
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\CredUI'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnumerateAdministrators' -Value 1 -Type DWord

Disable

# Disable: CredUI/EnumerateAdministrators
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\CredUI'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnumerateAdministrators' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": CredUI/EnumerateAdministrators
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\CredUI'
Remove-ItemProperty -Path $k -Name 'EnumerateAdministrators' -ErrorAction SilentlyContinue

Availability