Table of Contents

Enable or Disable Remote Desktop in Windows

CLI

http://serverfault.com/questions/364858/disable-remote-desktop-through-cmd-or-script-in-windows-2008

To disable remote desktop from Windows command line, run the below command as administrator:

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

To enable remote desktop from Windows command line, run the following command as administrator:

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

Remote Registry Edit

https://community.spiceworks.com/how_to/33687-remotely-enabling-rdp