Tips and Tricks: Remotely Enable Remote Desktop

Before I start this post, I need to say one thing: Mark Russinovich (as well as anyone else who works on the Sysinternals stuff) is a Windows Magician. The stuff these tools can do is just plan magic :).

Last week, my Dad's Dell XPS laptop decided it was tired of rendering graphics and the video card just stopped working (apparently this is a known issue). Dell support was fairly helpful and on Friday we received a box to sent the computer in for a motherboard replacement. Now, I'm paranoid when it comes to data, I don't trust anyone. So, I suggested we try and wipe the hard drive of all the sensitive data on the machine, and change the password so that we wouldn't have to give Dell the actual password. Now, only the graphics card was damaged, the computer ran just fine and even the graphics were intermittent (at first). We tried to get the graphics card working long enough to enable remote desktop, so we could connect from his screaming new Dell desktop (Quad Core i7 with 12GB of RAM... I'm jealous). Unfortunately, by that time, the graphics card was done... no dice :(

After a little searching, I came across some tips for enabling remote desktop... remotely. It turns out, there are a number of ways to connect to a machine and make changes remotely! The first tip I found was to use the remote registry to enable it: http://www.windowsdevcenter.com/pub/a/windows/2004/05/04/serverhacks_remote.html. Unfortunately, the Remote Registry service wasn't running on the laptop! That's when I found Sysinternals "PsService" tool. The tool allows you, as long as you have the Admin account password, to enable/disable and change the start mode of services on a remote machine. So, first I enabled to remote registry service

psservice bilbo -u [UserName] start RemoteRegistry

Then, just for good measure, I set the Remote Desktop service to autostart

psservice bilbo -u [UserName] setconfig TermService auto

Finally, rather than fight with creating a firewall rule remotely, I just disabled the Windows Firewall service (don't do this unless you absolutely have to :D)

psservice bilbo -u [UserName] setconfig MpsSvc disabled

(Btw, I got all these service names using the Services console on another machine)

Finally, I followed the instructions I mentioned earlier to set the right registry flags to allow Remote Desktop. I killed the power to the PC (I actually tried Sysinternals "PsShutdown" tool first, but had less luck getting that working :D) and restarted it. When I heard the Windows start up sound (as I said, the rest of the components worked just fine :), I fired up remote desktop connection and... bam! I had a remote desktop screen. After a quick pass over the data drive with yet another Sysinternals tool: "SDelete" and a password change, we shut the computer down, packed it up and sent it off to Dell, confident that the important data was scrubbed clean.

Like I said... black magic :). But seriously, the Sysinternals tools rock! If you don't have them, get them now!