cmd shutdown command

Here’s how to do the shutdown functions via a batch file:

  • shutdown -r — restarts
  • shutdown -s — shutsdown
  • shutdown -l — logoff
  • shutdown -t xx — where xx is number of seconds to wait till shutdown/restart/logoff
  • shutdown -i — gives you a dialog box to fill in what function you want to use
  • shutdown -a — aborts the previous shutdown command….very handy!
  • shutdown -h — hibernate. Easy mistake – it’s not for help

Additional options:

  • -f — force the selected action

more information:


workdiary has written 200 articles