Change the default RDP port 3389 to 8050, open it in the firewall and restart the RDP service to apply the changes.
1 2 3 4 5 |
@echo off powershell Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\' -Name PortNumber -Value 8050 netsh advfirewall firewall add rule name="RDP" dir=in action=allow description="RDP" protocol=tcp profile=any localport=8050 net stop termservice & net start termservice pause |