Open in the explorer

Enable RDP Shortpath for managed network using NAT traversal

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Azure Virtual Desktop › RDP Shortpath
Supported on
Azure Virtual Desktop
ADMX file
terminalserver-avd.admx
Internal name
terminalserver-avd/AVD_SERVER_UDP_SHORTPATH_DIRECT

Explanation

This policy lets you control RDP Shortpath for managed networks. It's a direct UDP connection between a client device and session host using a private connection, such as ExpressRoute private peering or a virtual private network (VPN). When the RDP Shortpath listener isn't enabled on session hosts and an inbound port isn't allowed, ICE/STUN is used to discover available IP addresses and a dynamic port that can be used for a connection.

If you enable or do not configure the policy this policy setting, Remote Desktop Protocol will consider managed networks paths to establish connection with the session host.

If you disable this policy, Remote Desktop Protocol will NOT consider managed networks path to establish connection with the session host.

Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
Value name
directUDP
StateValue written
EnabledREG_DWORD = 1
DisabledREG_DWORD = 2

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: terminalserver-avd/AVD_SERVER_UDP_SHORTPATH_DIRECT
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'directUDP' -Value 1 -Type DWord

Disable

# Disable: terminalserver-avd/AVD_SERVER_UDP_SHORTPATH_DIRECT
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'directUDP' -Value 2 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": terminalserver-avd/AVD_SERVER_UDP_SHORTPATH_DIRECT
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services'
Remove-ItemProperty -Path $k -Name 'directUDP' -ErrorAction SilentlyContinue

Application

Azure Virtual Desktop (Microsoft) — November 2026 templates

Official templates downloaded on November 12, 2026.