Thursday, January 29, 2026
HomeMicrosoftHow to Change Remote Desktop Port in Windows Server 2022

How to Change Remote Desktop Port in Windows Server 2022

This article will explain how to change remote desktop port in Windows Server 2022. The remote in server 2022 support is made possible by the Remote Desktop Protocol (RDP protocol) with which we reach a range of management within computers without having to go directly to the physical location of the user, this clarifies many tasks support and control for administrators.

By default, the RDP connection port used by Windows Server 2022 is port 3389 and though this may not be applicable, it can become a cause of weakness since an attacker can use the default port to make his connections and cause effects on your server. And in the information hosted there. Therefore, good security advice is to change default port and in this way add a touch of security to the system.

For more information and detailed instructions, you can visit the official Microsoft Documentation on changing the Remote Desktop port in Windows Server 2022:

Change Remote Desktop Port

In the Server Manager, click on local server and check the “Remote Desktop” is enabled.
If not, we must click there and enable it.

Server manager

Choose “allow remote connections to this computer and click ok.

Enable remote desktop

Open the Registry Editor by entering regedit in run.

Run command regedit

In the Registry Editor go to the following path.

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

In this instance, you will need to change the port number that the Remote Desktop service is listening on to 3350. To do this.
Find the name PortNumber. This parameter shows the port, on which your Remote Desktop service is running. Double click on the PortNumber value.

Change remote desktop port

The default port is 3389 (decimal), Change the value of this parameter.

Portnumber RDP-port

The RDP port is now set to 3350 (Decimal).

Change remote desktop port

How to Allow Remote Desktop Port in Windows Firewall

Search control panel and open it.

Search control panel

In the Control Panel, open Windows defender firewall.

Control panel

Click on advanced settings.

Windows defender firewall

Click on Inbound rules and then choose new rule.

Windows defender firewall inbound rules

New inbound rule wizard, select port and click next.

New inbound rule wizard

Specify local ports (3350) and click next.

Specify the protocols and ports

Choose allow the connection of this port and click next.

Allow the connection port

Specify the profiles for which this rule applies and click ok.

Inbound rule specify the profiles

Assign a name to the rule to create and click finish..

New inbound rule wizard name

Restart Windows Server 2022 to complete the port update process.

Restart windows server 2022

Test Remote Desktop Port

On any client computer, we need to test the remote desktop port numer.
Open run and type the command mstsc.

Run command mstsc

In the remote desktop connection window, enter the IP address of Windows Server 2022 with the port we have assigned earlier and click on connect.

Remote desktop connection

Enter the credentials to use and click ok.

RDC enter your credentials

It is an issue associated with the RDP certificates, click Yes to access remotely through the selected port.

Remote desktop connection certificate

We have successfully connected with the port number we changed.

Remote desktop connected
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments