Professional Documents
Culture Documents
Portu Keit
Portu Keit
Portu Keit
com/en-us/windows-server/remote/remote-desktop-
services/clients/change-listening-port
When you connect to a computer (either a Windows client or Windows Server) through the
Remote Desktop client, the Remote Desktop feature on your computer "hears" the
connection request through a defined listening port (3389 by default). You can change that
listening port on Windows computers by modifying the registry.
The next time you connect to this computer by using the Remote Desktop connection, you
must type the new port. If you're using a firewall, make sure to configure your firewall to
permit connections to the new port number.
You can check the current port by running the following PowerShell command:
PowerShellCopy
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal
Server\WinStations\RDP-Tcp' -name "PortNumber"
For example:
PowerShellCopy
PortNumber : 3389
PSPath :
Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
\Terminal Server\WinStations\RDP-Tcp
PSParentPath :
Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
\Terminal Server\WinStations
PSChildName : RDP-Tcp
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
You can also change the RDP port by running the following PowerShell command. In this
command, we'll specify the new RDP port as 3390.
PowerShellCopy
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal
Server\WinStations\RDP-Tcp' -name "PortNumber" -Value 3390
New-NetFirewallRule -DisplayName 'RDPPORTLatest' -Profile 'Public' -Direction Inbound -
Action Allow -Protocol TCP -
https://www.web24.com.au/tutorials/change-rdp-port-on-a-windows-server
Windows servers are remotely accessible with Remote Desktop via the TCP 3389 port
(default port). In some situations, when a more secure environment is needed, changing
the remote access port can be useful. This article explains how to change the RDP port on
a Windows Hosting Server.
Note: Make sure you have opened remote access to the new RDP port in Windows
Firewall before starting to avoid locking yourself out of the server.
The instructions below apply to machines running Windows Server 2012, 2008 R2, 2008,
and 2003. Please follow the below steps to change the RDP port:
After the reboot, specify the Remote Desktop port number. Learn more about
our Windows VPS hosting here.