6.13.2016

How to enable Remote Desktop Remotely

How to enable Remote Desktop Remotely


I had a friend who recently contacted me for help on getting into a HP Proliant Windows 2008 R2. He had advised me that the USB mouse and keyboard was not working. I had asked some basic troubleshooting info and asked him if he tried using Remote Desktop. He advised me that RDP was not enabled as it's a fresh install on an HP Proliant server. 

And thus...PSEXEC to the rescue.

In order to enable Remote Desktop Remotely there are a few things that you have to do. 

First download PSTOOLS. 

Then run the following commands..

#Disable Firewall Remotely WinXP
psexec \\%machinename% netsh firewall set opmode disable

#Disable Firewall Remotely WIN 7 and 2008
psexec \\%machinename% netsh advfirewall set currentprofile state off

#Add a registry key to enable RDP connections
psexec \\10.6.0.138 -u Administrator -p "Password" reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0

#Enables Remote Desktop 
psexec \\10.6.0.138 -u Administrator -p "Password" netsh firewall set service remotedesktop enable

#Enables Remote Desktop
psexec \\10.6.0.138 -u Administrator -p "Password" netsh firewall set service remoteadmin enable

#Reboots the PC, sometimes you have to do this after making the registry modification
psexec \\10.6.0.138 -u Administrator -p "Password" shutdown /r /f /t 3

netsh advfirewall firewall set rule group="remote desktop" new enable=Yes
netsh advfirewall firewall set rule group="remote desktop" new enable=Yes profile=domain
netsh advfirewall firewall set rule group="remote desktop" new enable=Yes profile=private

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.