How to Reboot Machine While Connected Through Remote Desktop
I assume that everyone who uses Remote Desktop in Windows knows this already, but just in case…
I use Remote Desktop all the time to connect back to one or more machines on my home network. I have a single static IP address and then have terminal server running on every box behind the router on a different port. So I can connect to any of my machines remotely, by using a different port.
Being able to remote connect to any/all of my machines is huge. I consider Remote Desktop to be one of the most critical tools that I use on a daily basis.
But I occasionally find that there is something funky on one of my home machines that leads to my wanting to reboot it. For example, I sometimes run into a situation where I can’t connect to the machine from outside my network, but I can still remote from a different machine in my home network. So I remote to the “visible” machine, then remote over to the “invisible” machine. Rebooting the problem machine seems to fix the problem.
The problem with rebooting is that the Shutdown and Restart options are removed from the Start Menu when you’re connected using Remote Desktop.
But not to worry–you can still reboot the machine, just using the command prompt. Here’s the magic command (Windows 7, Vista or Windows XP):
shutdown -t 0 -r -f
That’s a “zero” after the -t option, indicating shutdown in zero seconds. The -r option indicates a restart, rather than shutdown. (Don’t forget this one)! The -f option forces all applications to terminate.
So this is a critical command, worth remembering!
11 Comments »
Leave a comment
-
Archives
- January 2010 (1)
- July 2009 (1)
- June 2009 (3)
- May 2009 (1)
- April 2009 (3)
- March 2009 (3)
- February 2009 (2)
- January 2009 (7)
- November 2008 (7)
- October 2008 (19)
- September 2008 (4)
- August 2008 (4)
-
Categories
-
RSS
Entries RSS
Comments RSS

Good to know. thxs!
Great worked awesome!!!!!!
Pressing Alt-F4 in remote session will bring up the menu you need to shutdown or reboot.
I think that Alt-F4 just closes the active application, no? (At least it does for me, remoted into a Win XP machine).
Ahh, I see. Ok, Alt-F4 in Windows closes the active window/application–unless none of them has focus. So Mark’s suggestion is a good one, easier than bringing up a command shell.
Simply click on the taskbar to remove focus from your current application window. Then press Alt-F4. This works in either WinXP, Win Vista or Win 7. Thanks Mark!
you can also press CTRL-ALT-END which sends a CTRL-ALT-DEL though RDC to the host
ctrl-alt-end does not give shutdown options in windows 7.
Ctrl-Alt-End does show shutdown options. As Adam said, it sends a Ctrl-Alt-Del signal, which brings up the following options in the center of the screen: Lock, Log Off, Change Password and Start Task Manager. On a “real” Win 7 machine, rather that remote connected, you’ll also get an option to Switch User.
That Ctrl-Alt-Del screen also has a red power icon in the lower right portion of the screen that includes the options: Restart, Sleep, Shut Down. On a “real” machine that you’re not remoted into, you’ll also see the Hibernate option.
Thanks for the tip Sean, got here from the Googlenet!
Worked on my Windows 7.
You may want to edit the comment, below, in your article to include windows 7.
“Here’s the magic command (Vista or Windows XP)”
Sean! Thanks for this entry.
I’ve tried both methods here that got mentioned and they both worked on my Windows 7 machine while I was remoted into them.
The Ctrl-Alt-End thing threw me until somebody mentioned the “power” button on the lower right. Presto.
The “Click on the Taskbar and then type Alt-F4″ thing worked beautifully as well. Both of these are going into my handy commands file.
I had used the Shutdown command from the DOS prompt, but always found that klunky. The other two are quite nice and quick.
how i recover hard drive bad secteor.