Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Many times i am trying to connect to another machine, but realize when I'm connecting that Remote Desktop is not enabled on the target computer.

How does one enable remote destktop on the target machine, remotley?

share|improve this question

6 Answers 6

up vote 2 down vote accepted

Check this hack from O'Reilly posted back in 2004.

http://oreilly.com/windows/archive/server-hacks-remote-desktop.html

Basically, you just remote log into target computer's registry and change the settings there.

Hope it helps.

share|improve this answer
    
Interesting, but it has some security implications, does this still work nowadays? –  wazoox Jun 25 '09 at 20:10
    
I do believe this still works. However, I suppose whoever wants to do this have the proper rights accessing the remote computer. –  kentchen Jun 25 '09 at 22:45
    
This worked for me on Windows 7 and didn't require a reboot. –  Omar Shahine Jun 29 '09 at 3:41

IntelliAdmin has a free utility for this:

http://www.intelliadmin.com/blog/2006/06/remotely-enable-remote-desktop.html

EDIT - I cant remember if you need to open a firewall port or not to use this. If so, I use pstools to disable firewall on remote machines with the command prompt. Then run the tool. Then enable the firewall.

The psexec command to disable/enable firewall is: netsh firewall set opmode mode = disable

share|improve this answer
    
looks neat. Does it work for Vista? –  Bård Jun 25 '09 at 16:58
    
they do have some vista-compatible products, but I dont know if this one is or not. –  cop1152 Jun 25 '09 at 17:13

If the machine is in a domain you can use group policies to enable remote desktop.

If you can connect with remote registry, check this out: http://www.petri.co.il/remotely_enable_remote_desktop_on_windows_server_2003.htm

You might be able to use psexec from sysinternals to run some script that will enable rdp.

(I use the first alternative)

share|improve this answer

A Long Time Ago, In a Galaxy Far Away, I wrote this script as part of an automated Windows Server 2003 deployment script.

rd.reg:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
"fDenyTSConnections"=dword:00000000

Run the command (this was from a batch script running locally on the machine, to a mapped z drive):

c:\windows\regedit /s z:\netinst\rd.reg

If using AD you could push this out using Group Policy.

share|improve this answer
    
There's already an "Adminsitrative Template" setting for this - Windows Components / Terminal Services / Allow users to connect remotely using Terminal Services –  Evan Anderson Jun 25 '09 at 18:18
    
This was a pretty unique situation - we only had the ability to run batch scripts and this was a stand-alone server in a datacenter. But still, good to know this info. –  Dave Drager Jun 25 '09 at 18:32

Use WMI and the "[SetAllowTSConnections][1]" Method of the "*Win32_TerminalServiceSetting*" Class!

From a Windows 2003 command line, you can use the following from the command line:

wmic /node:TargetName RDToggle where ServerName="TargetName" call SetAllowTSConnections 1

[1]: http://msdn.microsoft.com/en-us/library/aa383644(VS.85).aspx SetAllowTSConnections

share|improve this answer

Change the registry value remotely? Might need to reboot though.

share|improve this answer

Your Answer

 
discard

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.