Remotely Reboot Windows Servers

Operating Systems by matt on October 1st, 2008 2 Comments

You may never need this one, but when and if you do, you’ll be glad you’ve got this tip in your back pocket.  No doubt, you never actually sit in front of a console for your AquaLogic Servers; if you’re on Windows, you’re using Windows Remote Desktop.

Occasionally, you need to reboot those servers, and you do it through the remote desktop.  But once in a blue moon (or more – it’s happened to me on a half dozen machines at one client and 2 machines at another in the last month), you go to reboot and Remote Desktop never comes back.  Typically, this is because Windows has started shutting down and killing windows processes – including Terminal Services.  But for whatever reason, Windows doesn’t reboot, and Remote Desktop is no longer available because the process is gone and isn’t restarted.

The solution:  remotely force the box to reboot again.  Simply run:

shutdown /r /f /m \\servername

… from any of the machines in the subnet. You’re telling the OS to force (/f) a reboot (/r) on a remote machine (/m). Works every time the OS is available but the Terminal Service is dead – check out the MS article for more info on this command.

2 Responses to “Remotely Reboot Windows Servers”

  1. Geoff Garcia says:

    I’ve been using: shutdown /m \\servername -r -f
    Is there any difference between using the / vs – commands?

  2. Matt Chiste says:

    Geoff, nope – for most command-line options, “/” and “-” mean the same thing for a delimiter. And the order rarely matters. So in this case, the commands are completely equivalent.

Leave a Reply

You must be logged in to post a comment.