Registry data refreshed from vendors: Last vendor change detected: 5 Dec 2026Next refresh: 1st of the monthApp v1.4.0 (5 Dec 2026): Cleanup or tattoo: see what stays behind after a GPO is removed. Release notes
Microsoft · Windows

Remote Desktop listening port (PortNumber)

The TCP and UDP port the Remote Desktop listener uses. The default is 3389.

Verified · 2026-12-05 Per machine (HKLM) Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016

Where it lives

  • HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

Values

NameTypeData and meaningDefault
PortNumberREG_DWORD1-65535 TCP/UDP port for this listener3389

In plain English

RDP-Tcp is the default listener. Each listener under WinStations has its own PortNumber. Regedit shows DWORDs in hexadecimal by default; select Decimal before you type the port.

Clients then connect with host:port, for example pc1.contoso.com:3390. Microsoft recommends keeping 3389 and controlling access with firewalls or a gateway instead.

RestartRestart the Remote Desktop Services service (TermService) or reboot. Add a firewall rule for the new port first, or you lock yourself out.
Group PolicyNo ADMX policy for the port. Use Group Policy Preferences or a script.
RiskChanging the port isn't a security control on its own. A wrong value or missing firewall rule cuts off remote access.

How to configure it

Move RDP to port 3390 safely

PowerShell

$port = 3390
New-NetFirewallRule -DisplayName "RDP-TCP-$port" -Direction Inbound -Protocol TCP -LocalPort $port -Action Allow
New-NetFirewallRule -DisplayName "RDP-UDP-$port" -Direction Inbound -Protocol UDP -LocalPort $port -Action Allow
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name PortNumber -Value $port
Restart-Service TermService -Force

Official sources

Verified Confirmed automatically on the cited source.

Remote Desktop and RDSNetworking (TCP/IP, SMB, DNS)