User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode: registry value ConsentPromptBehaviorAdminComputerHKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System

Category
Security Settings › Local Policies › Security Options
Scope
Computer Configuration
Source
Windows 11 (version 26H2 · 26300.9457)

Registry

ConsentPromptBehaviorAdmin

REG_DWORDComputer
Enabled value
Depends on the option value
Element
User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode
Options
ItemStored value
Elevate without prompting0
Prompt for credentials on the secure desktop1
Prompt for consent on the secure desktop2
Prompt for credentials3
Prompt for consent4
Prompt for consent for non-Windows binaries5
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System]

; Options (use only one)
; Elevate without prompting
"ConsentPromptBehaviorAdmin"=dword:00000000
; Prompt for credentials on the secure desktop
"ConsentPromptBehaviorAdmin"=dword:00000001
; Prompt for consent on the secure desktop
"ConsentPromptBehaviorAdmin"=dword:00000002
; Prompt for credentials
"ConsentPromptBehaviorAdmin"=dword:00000003
; Prompt for consent
"ConsentPromptBehaviorAdmin"=dword:00000004
; Prompt for consent for non-Windows binaries
"ConsentPromptBehaviorAdmin"=dword:00000005
CMD
:: Options (use only one)

:: Elevate without prompting
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 0 /f
:: Prompt for credentials on the secure desktop
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 1 /f
:: Prompt for consent on the secure desktop
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 2 /f
:: Prompt for credentials
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 3 /f
:: Prompt for consent
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 4 /f
:: Prompt for consent for non-Windows binaries
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 5 /f
PowerShell
# Common: create the key
New-Item -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Force | Out-Null

# Options (use only one)
# Elevate without prompting
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ConsentPromptBehaviorAdmin' -PropertyType DWord -Value 0 -Force | Out-Null
# Prompt for credentials on the secure desktop
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ConsentPromptBehaviorAdmin' -PropertyType DWord -Value 1 -Force | Out-Null
# Prompt for consent on the secure desktop
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ConsentPromptBehaviorAdmin' -PropertyType DWord -Value 2 -Force | Out-Null
# Prompt for credentials
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ConsentPromptBehaviorAdmin' -PropertyType DWord -Value 3 -Force | Out-Null
# Prompt for consent
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ConsentPromptBehaviorAdmin' -PropertyType DWord -Value 4 -Force | Out-Null
# Prompt for consent for non-Windows binaries
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ConsentPromptBehaviorAdmin' -PropertyType DWord -Value 5 -Force | Out-Null