1. Run Regedit
2. Select File | Connect Network Registry
3. Enter the name of the remote computer and select Check Names
4. Go to hklm\system\currentcontrolset\control\terminal server\FdenyTSConnection=1
5. Change the FdenyTSConnection to 0
Now you should be able to connect to the remote computer using Remote Desktop.
6. Reboot the remote machine by issuing the following command in Command Prompt:
shutdown -m \\hostname –r
7. Remote Desktop for the remote computer has been enabled and listening on default Remote Desktop port for any incoming Remote Desktop Connection. For security reason, you may want to consider changing the Remote Desktop listening port. There is also plenty of freeware utility that allows user to remotely enable Remote Desktop without modifying registry.
psexec \\computername reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0
You can also look at the following URL: