How do I restart Windows from Remote Desktop?

When you are in a remote desktop session that runs on Windows 7, Windows Server 2012 or 2008, you don’t see the Shutdown and Restart option in Start Menu. You can only disconnect or log off the remote session. So what to do if you do need to shutdown or restart the computer from the remote desktop session?

Assuming you are part of the local admin group that has the rights to shutdown or restart the computer, you can run the following command line:

shutdown /r - to restart the computer, or shutdown /s - to shutdown the computer

But, here is a much easy way that doesn’t involve the command line.

Simply focus on the desktop in Remote Session, and press Alt + F4 to bring up the Shut Down Windows dialog box that includes both Shutdown and Restart options.

Windows 2012 R2 -Shut Down WindowsWindows 7 – Shut Down Windows

This isn’t an issue in Windows 10 though, if you are running one of those Insider Builds. You still have the full shutdown options in Start Menu even when you are in the remote desktop session. If not, Alt + F4 is still your friend to shutdown or restart your Windows 10 PC through remote desktop session.

If you're frequently using the Windows Remote Desktop feature (aka Terminal Services) during your daily activity, you most likely already know that  the "System Shutdown" and "System Reboot" options are missing from the GUI. As a matter of fact, these buttons have been intentionally removed to protect the remotely connected user from accidentally or unwillingly shutdown or reboot the machine, thus shutting out himself and without being able to operate with it anymore.

That said, if you know what you're doing and you really need to remotely perform a system shutdown or reboot, you can use one of the following methods.

Method #1: Keyboard Shortcut

This is a neat & clean solution, fully manageable via GUI, which will most likely be appreciated by most keyboard shortcut fans.

  • Ensure that the focus is on the Desktop by simultaneously pressing Win + D
  • Press ALT + F4 to bring up the "Shut down Windows" popup window.
  • From such window, you'll be able to choose between the following list of actions: Disconnect, Sign out, Shut down, and Restart. Just pick the one corresponding to what you need to do, and you're done.

Method #2: Command Prompt

This option is slightly more complicated, however it might have sense whenever, for any reason, you are unable to use keyboard shortcuts in a decent way - for example if you are connecting via a mobile device using some not-so-great RDP native app.

  • From the START menu, go to All Programs > Accessories (on Windows 7) or just type "prompt" (Windows 8 / 8.1 and Windows 10).
  • Right-click on the Command Prompt icon, then left-click on Run as Administrator. Depending on the security settings on your machine, a warning popup might appear or not: if it does, just click OK to continue.
  • A black window will appear on the screen: in case you don't know it already, this is the Command Prompt.
  • Click inside the window to make sure you have the focus in it, then type in one of the following commands:
    • To perform a machine shutdown: shutdown /s /t 0
    • To issue a machine reboot: shutdown /r /t 0

Conclusion

That's it, at least for now: we hope this post can be useful for those who need to turn off or restart their machines remotely.

IMPORTANT: in case of shutdown, be wary that you won't be able to to access the machine using the Remote Desktop software anymore, unless you have the possibility to restart it (eg via Magic Packet); if you issue a reboot, you should be able to access the system again after a few minutes (the actual boot time), provided that the RDP service has been properly configured to automatically start upon each boot (the default settings when you install it for the first time).

Video liên quan

Chủ đề