How to remotely Shutdown or Reboot a Windows PC from a Command Prompt through LAN or VPN A neat shell command to shutdown or reboot a Windows client or server machine from another PC connected through LAN or VPN

Triangolo giallo sull'icona Rete di Windows: cosa significa e come eliminarlo

Did you know that we can issue a shutdown and/or reboot of a Windows PC from any other LAN-connected Windows machine? The only two things we need to do that are the following:

  • An administrative account (local or domain) valid for the PC you want to reboot
  • The feature "Allow users to connect remotely to this computer" (from Control Panel > System > Remote Desktop Settings) active for that user (or for all users).

If we got these two things, we can force a remote shutdown by following the steps below. For convenience, let's call LOCAL PC the machine we want to use to issue the shutdown/reboot command from, and REMOTE PC the machine which we want to shutdown.

  • Create a new account on the LOCAL PC with the same username and password of the REMOTE PC elevated account's credentials.
  • Open an elevated Command Prompt from the LOCAL PC and issue the following command, replacing <secs> with the number of seconds to wait before activating the shudown/reboot process - any value between 0 to 315360000 - and <ip> with the REMOTE PC IP address or hostname.

To issue a Shutdown

To issue a Reboot

That's about it! Now we know what to do when you know that our server is up and running but wq cannot access it through Remote Desktop and/or TeamViewer anymore.


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 *

The reCAPTCHA verification period has expired. Please reload the page.

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