Change RDP PORT on windows servers

Change RDP PORT on windows servers.
=====================================

Please follow the below steps to change the RDP port for windows server.

+++++++++++++++++++
1. Connect to your server via Remote Desktop.

2. Click simultaneously on the Windows logo + R to open the “Run” dialogbox and execute the “cmd” command.

3. Open the registry editor by typing the “regedit” command.

4. Search for this registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP- Tcp\PortNumber

5. Double-click or right-click on the “PortNumber” registry subkey, select the decimal base and type the port number of your choice.

6. Click on “Ok” to save your selection.

7. IMPORTANT: Make sure that remote access to your server through the new port is authorized in your Windows firewall.

Please follow the below steps authorize the new RDP port in the firewall.
———————————————————————-
7.1. Click simultaneously on the Windows logo + R to open the “Run” dialog and execute the “firewall.cpl” command(It will open the firewall management section).

7.2. Go to Advanced setting >> inbound rules >> open newrule >> select “port” >> next >> tcp >> specify local port(new RDP PORT) >> next >>allow connection.

8. Exit the registry editor

9. Restart your server