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
shutdown /f /t <secs> /m \\<ip> -c "This PC will shutdown in <xx> seconds"
To issue a Reboot
shutdown /r /f /t <secs> /m \\<ip> -c "This PC will reboot in <xx> seconds"