設定用戶端的伺服器驗證 的登錄值 AuthenticationLevel電腦HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
- 原則 ID
- TS_SERVER_AUTH
- 適用範圍
- 電腦設定
- 支援的作業系統
- 至少需要 Windows Vista 含 Service Pack 1
- 來源
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (版本 1.0)
- 類別
- Windows 元件 › 遠端桌面服務 › 遠端桌面連線用戶端
登錄
AuthenticationLevel
REG_DWORD電腦- 啟用時的值
- 取決於選項值
- 元素
- 驗證設定:
| 項目 | 儲存的值 |
|---|---|
| 即使驗證失敗,還是連線 | 0 |
| 如果驗證失敗,則警告我 | 2 |
| 如果驗證失敗,則不要連線 | 1 |
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services] ; 選項 (只使用其中一個) ; 即使驗證失敗,還是連線 "AuthenticationLevel"=dword:00000000 ; 如果驗證失敗,則警告我 "AuthenticationLevel"=dword:00000002 ; 如果驗證失敗,則不要連線 "AuthenticationLevel"=dword:00000001
CMD
:: 選項 (只使用其中一個) :: 即使驗證失敗,還是連線 reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "AuthenticationLevel" /t REG_DWORD /d 0 /f :: 如果驗證失敗,則警告我 reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "AuthenticationLevel" /t REG_DWORD /d 2 /f :: 如果驗證失敗,則不要連線 reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "AuthenticationLevel" /t REG_DWORD /d 1 /f
PowerShell
# 共通: 建立機碼 New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Force | Out-Null # 選項 (只使用其中一個) # 即使驗證失敗,還是連線 New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'AuthenticationLevel' -PropertyType DWord -Value 0 -Force | Out-Null # 如果驗證失敗,則警告我 New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'AuthenticationLevel' -PropertyType DWord -Value 2 -Force | Out-Null # 如果驗證失敗,則不要連線 New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'AuthenticationLevel' -PropertyType DWord -Value 1 -Force | Out-Null