Categories
Windows 7

How to Enable Remote Desktop Remotely using PSEXEC

If you’re like me, you’ve probably tried to connect to a remote Windows system and found that the "Allow Remote Connections" setting is disabled. Well I found this great little article, Ben O’Sullivan’s Blog, that will allow you to enable it remotely. 

 

 

  • Download and install PSExec. This is an offical tool from Microsoft to emulate a remote command prompt. 
  • Enter the following command to enable remote desktop in cmd
    psexec \\machinename reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0
  • Enter these commands enable RDP traffic through the windows firewall
    psexec \\remotecomputername netsh firewall set service remoteadmin enable
    psexec \\remotecomputername netsh firewall set service remotedesktop enable

    psexec netsh