使用者帳戶控制:使用系統管理員保護來執行的系統管理員的提高權限提示行為 的登錄值 ConsentPromptBehaviorEnhancedAdmin電腦HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System

類別
安全性設定 › 本機原則 › 安全性選項
適用範圍
電腦設定
來源
Windows 11 (版本 26H2 · 26300.9457)

登錄

ConsentPromptBehaviorEnhancedAdmin

REG_DWORD電腦
啟用時的值
取決於選項值
元素
使用者帳戶控制:使用系統管理員保護來執行的系統管理員的提高權限提示行為
選項
項目儲存的值
在安全桌面提示輸入認證1
在安全桌面提示要求同意2
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

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

; 選項 (只使用其中一個)
; 在安全桌面提示輸入認證
"ConsentPromptBehaviorEnhancedAdmin"=dword:00000001
; 在安全桌面提示要求同意
"ConsentPromptBehaviorEnhancedAdmin"=dword:00000002
CMD
:: 選項 (只使用其中一個)

:: 在安全桌面提示輸入認證
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorEnhancedAdmin" /t REG_DWORD /d 1 /f
:: 在安全桌面提示要求同意
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorEnhancedAdmin" /t REG_DWORD /d 2 /f
PowerShell
# 共通: 建立機碼
New-Item -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Force | Out-Null

# 選項 (只使用其中一個)
# 在安全桌面提示輸入認證
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ConsentPromptBehaviorEnhancedAdmin' -PropertyType DWord -Value 1 -Force | Out-Null
# 在安全桌面提示要求同意
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ConsentPromptBehaviorEnhancedAdmin' -PropertyType DWord -Value 2 -Force | Out-Null