Enable Remote Desktop on Remote PC with PSExec

PSExec is part of the Sysinternal Suite and can be downloaded from http://technet.microsoft.com/en-US/sysinternals

psexec \\machinename reg add “hklm\system\currentcontrolset\control\terminal server” /f /v fDenyTSConnections /t REG_DWORD /d 0
psexec \\machinename netsh firewall set service remoteadmin enable
psexec \\machinename netsh firewall set service remotedesktop enable
Use ipadress instead of machinename. Change 0 to 1, to deactivate RDP.