Okay, hacking is a bit too strong of a term, but one of the things I dislike about RDP (Remote Desktop) Sessions into XP boxes is that you don't have the option to power down the box from the console.
Most of the XP boxes I log into via RDP are, in fact, Virtual Machines, so turning them off is still totally within my control via various other digital interfaces, but I still prefer to have the option to Shut Down when I close out Sessions on some boxes.
So, yesterday I remembered the Shutdown command. Yup, no big secret there, but it's been working like a charm. At present I've just been opening a command prompt and typing:
Shutdown -f -s - t 2 (-f = force a shutdown, -s = shutdown (instead of reboot/etc), and -t specifies the number of seconds to wait... type Shutdown /? at the prompt for more options/info).
What's really cool too is that the RDP window/session just terminates gracefully when you do this. No 'dunkkk' sound as RDP says: "Heyyy, something pulled the rug out from under us, and we lost connectivity...". (Bonus)
Since I'm lazy, I think I'll probably put that command into a simple batch script and then drag a short-cut to it on the quick-launch bar of most of my XP VMs... just to make the shutdown process quicker/easier. (Cuz who needs typing to shutdown a machine?)
(It's also possible to send remote Shutdown commands - but since I don't always use the same username on my VMs as my local machine, NTLM can't grant me a session on the remote box... and it just doesn't work as efficiently as a simple Shutdown command on the targeted box itself. (Especially since I work out of a workgroup, and my VMs frequently are part of a domain... ))
UPDATE: Corey sayz (via the comments) that CTRL+ALT+END in RDP gets you to the Shut Down Dialog (added to the Task Manager as an additional menu). Thanks for the tip Corey!
Ctrl-Alt-End in RDP brings up the shutdown option.
http://www.coreyh.com/blog/archive/2005/02/14/1428.aspx
cheers!
Posted by: Corey | November 08, 2006 at 11:42 AM
Thanks Corey - that's tons easier. (And I think I remember seeing that somewhere before... only I waited too long between seeing it and using it, so it didn't stick.)
Excellent info though...
Posted by: Michael K. Campbell | November 08, 2006 at 11:51 AM
What does the P stand for anyway? Remote Desktop P________?
Posted by: Carson | November 08, 2006 at 07:55 PM
P = Protocol. I think. That's, at least, how I complete that in my mind. I'd hate to think that it was _R_emote _D_eskto_p_ ;)
Posted by: Michael K. Campbell | November 08, 2006 at 08:01 PM