Get the App
SLTechnology News&Howtos  ›  Servers  › 

​ modifies remote Desktop port number 3389

Shulou Source: shulou.com Published: 2022-06-02 04:11:47 10月04日 Update

Modify remote Desktop port number 3389

Modify

Reg add "HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Terminal Server\ Wds\ rdpwd\ Tds\ tcp" / v "portnumber" / t REG_DWORD / d "37000" / f

Reg add "HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Terminal Server\ WinStations\ RDP-Tcp" / v "portnumber" / t REG_DWORD / d "37000" / f

Query

Reg query "HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Terminal Server\ Wds\ rdpwd\ Tds\ tcp" / v "portnumber"

Add Firewall Policy

Netsh advfirewall firewall add rule name= "desktop_port" protocol=TCP dir=in localport=37000 action=allow

Restart related services to make the configuration effective

Net stop TermService / y

Net start termservice

Reminder: if you are remotely logged in to restart the TermService service, please remember to use the bat script, otherwise you may not be able to remotely

Tags: Services slogans desktops policies scripts firewalls queries login configuration fire prevention Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Apple Microsoft Linux macOS