Set RD Gateway authentication method: registry value AllowExplicitLogonMethod and 1 moreUserHKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services

Policy ID
TS_GATEWAY_POLICY_AUTH_METHOD
Scope
User Configuration
Supported on
At least Windows Server 2003 operating systems with SP1 or Windows XP Professional with SP2
Source
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
Category
Windows Components › Remote Desktop Services › RD Gateway

Registry

AllowExplicitLogonMethod

REG_DWORDUser
Checked
1
Element
Allow users to change this setting
Value type
REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services]

; Options (use only one)
; Checked
"AllowExplicitLogonMethod"=dword:00000001
CMD
:: Options (use only one)

:: Checked
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "AllowExplicitLogonMethod" /t REG_DWORD /d 1 /f
PowerShell
# Common: create the key
New-Item -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Force | Out-Null

# Options (use only one)
# Checked
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'AllowExplicitLogonMethod' -PropertyType DWord -Value 1 -Force | Out-Null

LogonMethod

REG_DWORDUser
Enabled value
Depends on the option value
Element
Set RD Gateway authentication method
Options
ItemStored value
Ask for credentials, use Negotiate protocol5
Ask for credentials, use NTLM protocol2
Ask for credentials, use Basic protocol1
Use locally logged-on credentials4
Use smart-card3
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services]

; Options (use only one)
; Ask for credentials, use Negotiate protocol
"LogonMethod"=dword:00000005
; Ask for credentials, use NTLM protocol
"LogonMethod"=dword:00000002
; Ask for credentials, use Basic protocol
"LogonMethod"=dword:00000001
; Use locally logged-on credentials
"LogonMethod"=dword:00000004
; Use smart-card
"LogonMethod"=dword:00000003
CMD
:: Options (use only one)

:: Ask for credentials, use Negotiate protocol
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "LogonMethod" /t REG_DWORD /d 5 /f
:: Ask for credentials, use NTLM protocol
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "LogonMethod" /t REG_DWORD /d 2 /f
:: Ask for credentials, use Basic protocol
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "LogonMethod" /t REG_DWORD /d 1 /f
:: Use locally logged-on credentials
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "LogonMethod" /t REG_DWORD /d 4 /f
:: Use smart-card
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "LogonMethod" /t REG_DWORD /d 3 /f
PowerShell
# Common: create the key
New-Item -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Force | Out-Null

# Options (use only one)
# Ask for credentials, use Negotiate protocol
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'LogonMethod' -PropertyType DWord -Value 5 -Force | Out-Null
# Ask for credentials, use NTLM protocol
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'LogonMethod' -PropertyType DWord -Value 2 -Force | Out-Null
# Ask for credentials, use Basic protocol
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'LogonMethod' -PropertyType DWord -Value 1 -Force | Out-Null
# Use locally logged-on credentials
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'LogonMethod' -PropertyType DWord -Value 4 -Force | Out-Null
# Use smart-card
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'LogonMethod' -PropertyType DWord -Value 3 -Force | Out-Null