The steps detailed through this article would involve changes to the Windows registry. Therefore, as for any changes that are performed on a system,its advisable to create a backup first. (is not always enough to follow some steps carefully).
1. Start the Registry Editor: Start > Run > type ‘regedit’ and press enter.
2. Navigate to the following registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber (HKEY_LOCAL_MACHINE > System > CurrentControlSet > Control > TerminalServer > WinStations > RDP-Tcp > PortNumber)
3. At this point you should be able to see the hexadecimal value of the current port (the default remote desktop port for a Windows machine is 3389, so you should see d3d in the port field, representing the hexadecimal conversion):
4. On the Edit menu, click Modify and then click Decimal. This should change the port value to 3389.
5. Type the new port number, click OK and quit Registry Editor.
IMPORTANT: Before going to step 6) make sure that the new port is opened through the firewall.
6. Restart the computer.