Steps to update the remote desktop default port to 50262 -
Go to start >> select run -
1. Type regedit
2. Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber.
3. On the Edit menu, click Modify, and then click Decimal.
4. Type the new port (50262) number, and then click OK.
5. Quit Registry Editor.
6. Restart the computer.
Note - Before restarting the computer, if firewall is running then you will need to allow TCP 50262 port in firewall.