Enable or Disable RDP via Command Line (Windows)

Enable or disable Remote Desktop connections to your Windows machine using Command Prompt or PowerShell.
Run the required command from shell with Administrative privileges.

To enable RDP:

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

To disable RDP:

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f

By anup

Leave a Reply

Your email address will not be published. Required fields are marked *