Start-Run-Registry Edit-OK
Or "win+r"-"cmd"-ok.
Locating registry
HKEY _ LOCAL _ MACHINE \ SYSTEM \ current Control set \ Control \ Terminal Server \ Wds \ rdpwd \ Tds \ TCP
Modify the value of the port number on the right. The default value is 3389. Just modify it to the desired port.
As shown below, it is modified to 3222.
PS: the radix is decimal.
Locating registry
HKEY _ local _ machine \ system \ currentcontrol1set \ control \ terminal server \WinStations\RDP-Tcp
Modify the value of PortNamber on the right, with the default value of 3389 and the port number set in the previous step: 3222.
After setting, it will take effect after restarting.
When using Remote Desktop Connection, you need to add? :3222