Shutdown and Restart a Windows PC from a Remote Desktop session – RDP How to perform a system shutdown and/or restart on a Windows machine from a Remote Desktop session using RDP protocol

How to block File Sharing for one or more IP Addresses in Windows

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.

Shutdown and Restart a Windows PC from a Remote Desktop session - RDP

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

Shutdown and Restart a Windows PC from a Remote Desktop session - RDP


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).


About Ryan

IT Project Manager, Web Interface Architect and Lead Developer for many high-traffic web sites & services hosted in Italy and Europe. Since 2010 it's also a lead designer for many App and games for Android, iOS and Windows Phone mobile devices for a number of italian companies. Microsoft MVP for Development Technologies since 2018.

View all posts by Ryan

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.