Connect to your server via Remote Desktop
Click simultaneously on the Windows logo + R to open the “Run” dialog and execute the “cmd” command
Open the registry editor by typing the “regedit” command
Search for this registry subkey:
Double-click or right-click on the “PortNumber” registry subkey, select the decimal base and type the port number of your choice (the default port is 3389, in this example, we selected port 3390). Click on “Ok” to save your selection.
IMPORTANT: Make sure that remote access to your server through the new port is authorized in your Windows firewall before executing the next step. Add a new Firewall Port Incoming rule allowing the port number.
Exit the registry editor
Restart your server
After the reboot, specify the Remote Desktop port number.