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!