How to change the listening port for Remote Desktop

Sometimes it is required to edit the Remote Desktop listening port for a specific machine, or machines to accommodate firewall paths, deployment methods, or for various other reasons. In order to change change the port that Remote Desktop listens on, follow these steps.

Disclaimer: These steps require that you modify the system registry. Please only do so if you have a solid understanding of what you are doing. Serious problems might occur if you modify the registry incorrectly. Make sure that you follow these steps carefully and for added protection, back up the registry before you modify it.

Instructions on how to backup and restore your registry can be found here: http://blogs.gottied.com/archives/31

  1. Start Registry Editor. (regedit)
  2. Locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber
  3. On the Edit menu, click Modify, and then click Decimal.
  4. Type the new port number, and then click OK.
  5. Quit Registry Editor.
  6. Restart the computer.

Note: When you try to connect to this computer by using the Remote Desktop connection, you must type the new port in the following format: computername:portnumber (i.e. SteveDesktop:12345).

Please also note that the steps are slightly different for Windows XP. I will add those steps shortly.