Rebooting a web server remotely using iisreset


This one surprised me a lot when we found it. You can reboot a computer that is running IIS remotely by running the command:


   iisreset [computerName] /reboot


It's been very useful today when we've been patching a whole rack of servers with security patches, but could be very dangerous in the wrong hands 🙂


There are a few more interesting options available. Do iisreset /? for more details.

Comments (6)

  1. Kris says:

    You mean rebooting the machine itself or just the restarting the web server?

  2. tony says:

    wmic /node:servername os call reboot

    more reliable

  3. John Pollard says:

    Yes it actually reboots the machine itself

    John

  4. Yasir says:

    Thanks

  5. dmilam says:

    what rights are needed?

  6. John Pollard says:

    @dmilan – I am guessing, but I would assume (and hope) you'd need Administrator access

Skip to main content