Restart a Windows 7 computer connected via Remote Desktop Connection

Q:How do I restart a Windows 7 computer that I'm connected to via Microsoft's Remote Desktop Connection?

A:Among many things Windows 7 introduced was a lack of a convenient method to shutdown a computer you are connected to remotely. In Windows XP a remotely connected administrator used to be able to launch taskmgr.exe and use the shutdown command there. However, that functionality doesn’t exist in Windows 7.

As a result, I went ahead and wrote this .BAT file that you can put on your desktop and use to restart your computer remotely should the need arise. If you don’t want to download it and create it yourself, simply launch your favorite text editor and enter this:

<code>shutdown -r -t 05</code>

Make sure the text editor is a Plain Text editor and save the file with the extension “.BAT” instead of “.TXT” Double clicking that .BAT file will force the system to restart after 5 seconds. You can change the “05” to however many seconds you would like the delay between invoking the file and the system shutting down.

If you are doing this one time, you can simply launch a command window and run the same command. It will work just as well there as it will in a .BAT file.