Change the Remote Desktop Port on Windows

To change the Remote Desktop port, edit PortNumber in the receiving PC's registry. Update that value and the firewall, then restart the host. Connect using its name followed by a colon and the new port.

The receiving PC's port setting is just one part of this change. A firewall still allowing only the old port, or a client still using it, can make a correctly configured host look unreachable.

Prepare the host and a way back in

Sign in as an administrator on the receiving PC. These instructions apply to the built-in Windows Remote Desktop host, including supported Windows 11, Windows 10, and Windows Server editions.

Windows Home can't act as that host. Changing a registry value doesn't add the missing feature. Check the Remote Desktop edition and connection requirements if incoming connections have never worked.

Drawing of Registry Editor Edit DWORD with Decimal and the PortNumber value selected

Have local access or another working management connection before changing the listening port. If you're using the Remote Desktop (RDP) connection you're changing, restarting ends that session. A mistake can stop you reconnecting.

Write down the current port and the intended replacement. The standard port is 3389, but a managed PC might already use a different value. Keep its existing firewall settings until the replacement connection has been checked.

I'd make this change when other people have finished using the host. Saving the registry value takes seconds; recovering access is the part that needs planning.

1. Read the current PortNumber value

Search Start for Registry Editor and open it. Approve the administrator prompt, then navigate to this key on the host PC:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

Select RDP-Tcp, then find PortNumber in its right pane. Double-click that value, or select it and use Edit > Modify. Don't create a second value with a similar name.

Choose Decimal before reading the number. Registry Editor can also show the value in hexadecimal, which uses a different number system. The same stored port can therefore look different depending on the selected base.

Write down the decimal number for restoring the original port. Select Cancel if you're only checking it at this stage, so an accidental edit doesn't become the new setting.

Microsoft says its listening-port procedure uses this key for both Registry Editor and PowerShell. It isn't a setting in the client computer's Remote Desktop display options.

2. Enter the new port in Decimal

Open PortNumber again, select Decimal, and replace Value data with the desired port. This example uses 3390; choose an available port approved for your own PC or network.

Click OK and close Registry Editor. Complete the firewall step before restarting the computer, so the firewall doesn't block connections to your new port.

For an administrator who prefers PowerShell, the equivalent registry change is:

$rdpKey = 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp'
Get-ItemProperty -Path $rdpKey -Name PortNumber
Set-ItemProperty -Path $rdpKey -Name PortNumber -Value 3390

Run that in an administrator PowerShell window on the host. The first command reads the current setting; the last writes the example replacement. Use one editing method, rather than repeating both and losing track of which value you've set.

For an organization-managed host, ask its administrator to handle the change. A local edit can conflict with its firewall or remote-access policy, and the next connection needs to follow the organization's approved route.

3. Allow the chosen port through the firewall

Create inbound Windows Firewall rules for the same new port. RDP uses TCP and can also use UDP, so create the pair rather than opening a different number for each protocol.

For a trusted network using the Private firewall profile, these administrator PowerShell commands allow the example port:

New-NetFirewallRule -DisplayName 'RDP-3390-TCP' -Profile Private -Direction Inbound -Action Allow -Protocol TCP -LocalPort 3390
New-NetFirewallRule -DisplayName 'RDP-3390-UDP' -Profile Private -Direction Inbound -Action Allow -Protocol UDP -LocalPort 3390

The Private parameter names a firewall profile. Use the profile approved for this connection. For a domain-managed host, have your IT team supply the required rules instead of copying this home-network example.

The commands must match the port you entered in Registry Editor. If you chose something other than 3390, change both the rule names and LocalPort values to keep the configuration understandable.

If you use a third-party firewall, allow the same connection there too. If another administrator controls a firewall between the client and host, give them the host address, port, and required protocols before testing.

A different port still needs the protection of a secure remote-access route. Keep an existing VPN or managed gateway arrangement, and don't open direct internet access to RDP just to complete this change.

4. Restart and include the port in the connection address

Save your documents, then restart the receiving computer. After it starts, open Remote Desktop Connection on the client and put the computer name and new port in the Computer box.

Drawing of Remote Desktop Connection with an example host name and port in the Computer field

For example, if the host is named office-pc and the chosen port is 3390, enter:

office-pc:3390

Replace both parts with your actual host name and selected number. Using only the name makes the client try the normal default port, instead of the new one you set.

Use a Windows account with Remote Desktop access to sign in. If you reach the usual sign-in prompt or desktop, the client has reached the host's new port. If your account is rejected at that point, check its Remote Desktop permissions.

If it won't connect, use a PowerShell TCP port test against the host and your chosen port. If the test fails, check the host's listening port, firewall, and network connection next.

Recover a connection that stopped after the change

Use local access to reopen the same registry value. Confirm Decimal and compare its number with the client's address and both firewall rules. A mismatch in any of those places is enough to stop the connection.

To restore the previous configuration, restore the recorded decimal value, check that its firewall rule is still available, and restart again. Reconnect using that original port before removing rules for the abandoned replacement.

For a work PC, send IT the original port, new port, client address, and exact error. Ask them to check the port the host is listening on and the inbound firewall rules that apply to it.

The Short Version

Change PortNumber on the receiving PC, allow the same TCP and UDP port, then restart it. Connect with host:port. Keep a local recovery route and the original value so a firewall or address mismatch doesn't leave you locked out.

Checked December 3, 2026.

If you have any business, I can build it online

Hi, I’m Hamza. I’ve been building websites and online shops for business owners since 2019, and I also built this site you’re reading.

Tell me what business you have or what you’re working on. I’ll look into how much it can grow online, and then we talk. You don’t have to buy anything or hire me first.

Chat with me on my site and I’ll show you proof of businesses I’ve helped and how they’ve grown.

Written by Isaac Smith

Isaac Smith is the founder and editor of PC Glance, a website that covers computers, laptops, and technology. He is a tech enthusiast and a computer geek who loves to share his insights and help his readers make smart choices when buying tech gadgets or laptops. He is always curious and updated about the latest tech trends.

More from Isaac Smith

Leave a Comment