Shutdown Windows from the command line

I had an odd problem with an SBS 2003 box that just would not shutdown the other day. A quick bit of research taught me that it can be done from the command line, which I totally didn’t know (‘cos I’m an idiot):

I used – Shutdown /r /c “App slowdown” /t 5

The r switch makes it restart, the c is for the custom comment or reason for shutdown and the t is the time before shutdown in seconds.

There are loads of other switches you can use – take a look here for the full list.



  1. For anyone thinking of making some neat desktop buttons to give quick shutdown and restart access – test this very carefully. I did this and then discovered that using them meant that any changes to my user profile weren’t being saved. I don’t use the default “My Documents”, etc areas, etc, so I don’t know whether they would have been lost too, but any new desktop icons I create, etc were being lost when I used this command – another miscrosoft programming truimph!!!!