Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a remote Win7 box that I can SSH into (via Cygwin). I apparently forgot to turn RDP on before leaving it. I've got wget accessible, but obviously no way of getting to a GUI.

Is there a way to either enable RDP or install and set up VNC via the command line? If so, where would I start?

Note that I also don't want to reboot the computer - it would be vastly preferable if whatever was involved could be done without a reboot.

share|improve this question
up vote 6 down vote accepted

You can enable RDP with the following commands:

C:\>netsh firewall set service remoteadmin enable
C:\>netsh firewall set service remotedesktop enable

Alternatively you can also modify the remote registry with the following command:

C:\>reg add "HKLM\system\currentcontrolset\control\terminal server" /v fDenyTSConnections /t REG_DWORD /d 0

Value fDenyTSConnections exists, overwrite(Y/N)? y

The operation completed successfully
share|improve this answer
Sorry for the delayed response, it turned out I didn't have administrator access :) Trying locally once I did: the "netsh" commands had no effect, but the "reg add" command worked perfectly. (Note: it worked after the netsh commands, I didn't try to undo the netsh commands first. They may both be necessary.) Thanks! – ZorbaTHut Sep 12 '10 at 6:52

The Reg Add command works perfectly when using PSEXEC on remote machines

c:\PSTools> psexec \\[computername] reg add "HKLM\system\currentconminal server" /v fDenyTSConnections /t REG_DWORD /d 0

Command should return the following:

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals -

Value fDenyTSConnections exists, overwrite(Yes/No)? y
The operation completed successfully.
reg exited on [computername] with error code 0.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.