Configure server authentication for client: registry value AuthenticationLevelComputerHKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
- Policy ID
- TS_SERVER_AUTH
- Scope
- Computer Configuration
- Supported on
- At least Windows Vista with Service Pack 1
- Source
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
- Category
- Windows Components › Remote Desktop Services › Remote Desktop Connection Client
Registry
AuthenticationLevel
REG_DWORDComputer- Enabled value
- Depends on the option value
- Element
- Authentication setting:
| Item | Stored value |
|---|---|
| Always connect, even if authentication fails | 0 |
| Warn me if authentication fails | 2 |
| Do not connect if authentication fails | 1 |
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services] ; Options (use only one) ; Always connect, even if authentication fails "AuthenticationLevel"=dword:00000000 ; Warn me if authentication fails "AuthenticationLevel"=dword:00000002 ; Do not connect if authentication fails "AuthenticationLevel"=dword:00000001
CMD
:: Options (use only one) :: Always connect, even if authentication fails reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "AuthenticationLevel" /t REG_DWORD /d 0 /f :: Warn me if authentication fails reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "AuthenticationLevel" /t REG_DWORD /d 2 /f :: Do not connect if authentication fails reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "AuthenticationLevel" /t REG_DWORD /d 1 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Force | Out-Null # Options (use only one) # Always connect, even if authentication fails New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'AuthenticationLevel' -PropertyType DWord -Value 0 -Force | Out-Null # Warn me if authentication fails New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'AuthenticationLevel' -PropertyType DWord -Value 2 -Force | Out-Null # Do not connect if authentication fails New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'AuthenticationLevel' -PropertyType DWord -Value 1 -Force | Out-Null