Press “Windows + R” to open Windows Run dialog. Type “regedit” in the Run box and press Enter to open Windows Registry Editor.
Navigate to the following registry subkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber
Click Edit > Modify, and then click Decimal. Type the new port number, and then click OK.
Note: The recommended range for RDP ports is 1024-65535.
Open the new RDP port in Windows Firewall