Wednesday, October 21, 2009

howto enable remote desktop on a remote windows machine that has it disabled

here's the scenario:
i'm working from home over a vpn to the office, i have administrative access to the computer i need to work on and the firewall is set with an exception to allow remote desktop/terminal services, but remote desktop is disabled

if i were on site i could simply right click my computer, hit properties, hit remote, then check the "enable remote desktop on this computer" checkbox which would do the trick


fortunately, the setting that the above checkbox activates is something we can change remotely

we need to fire up the registry edit, click start then run then enter regedit, press enter...you are now looking at the windows registry editor, and honestly, if this is your first time seeing the windows registry editor i would highly advise exercising EXTREME CAUTION!!

here is more detailed information about the windows registry:
http://technet.microsoft.com/en-us/library/cc751049.aspx

disclaimer: EDITING YOUR WINDOWS REGISTRY CAN BREAK THINGS! IF YOU MESS UP AN INSTALL AND IT NO LONGER BOOTS OR WORKS, DO NOT COME CRYING TO ME!



now that we have the windows registry editor open, we need to connect to the remote computer, hit file, then "connect network registry"


in the window that popped up, type in the name of the computer we are trying to get into and hit enter, the registry editor will then connect to the remote computer's registry...again, provided you have administrative level access on the remote computer and there is nothing blocking you (firewall, etc.)


here we are, all up in their registry


now we're going to navigate to this key in the registry of the remote computer:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server

find the key named fDenyTSConnections and change it's value from 1 to 0, then click ok


in most cases, that is it! you should now be able to connect to the remote computer's terminal server through remote desktop!

in some occasions, the computer may need to be restarted, the easiest way to do this, in my opinion, would be to open a command prompt and issue this command, replace "jane" with the ip address or computer name of the remote system you need to reboot:
shutdown -m \\jane -r -t 000 -f

give it a minute or 2, and the machine should be up again and allowing you to connect without issue