Use PSEXEC to enable RDP on a machine

  1. psexec \\remotecomputername -u username -p password reg add “hklm\system\currentcontrolset\control\terminal server” /f /v fDenyTSConnections /t REG_DWORD /d 0
  2. psexec \\remotecomputername -u username -p password netsh firewall set service remoteadmin enable
  3. psexec \\remotecomputername -u username -p password netsh firewall set service remotedesktop enable
Advertisements