http://blogs.msdn.com/tonyschr/archive/2004/04/19/116245.aspx
Enabling Remote Desktop, remotely
Let’s say you’re in a situation where you can’t log into your XP machine because you forgot to click that checkbox. psexec to the rescue!
psexec \\machinename reg add
“hklm\system\currentcontrolset\control\terminal server” /f /v fDenyTSConnections /t REG_DWORD /d 0
I shouldn’t have to say that this isn’t in any way supported, or that it’s not going to work if you’re not already an admin on the machine that has RD access, or that a firewall will get in the way, or that there may be better ways to do it using script or WMI, but I’ve found it useful on a couple occasions.
posted on Monday, April 19, 2004 2:34 PM by tonyschr