开始-运行-CMD下粘贴以下命令,回车后重启服务器远程端口就是26416,如需要修改为其它端口修改三处26416 为你想要的端口
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp" /v PortNumber /t reg_dword /d 26416 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v PortNumber /t reg_dword /d 26416 /f
netsh advfirewall firewall add rule name="Remote Desktop (TCP-In)" protocol=TCP dir=in localport=26416 service=any profile=any description="For foreign Windows editions" action=allow