command line - How do I shutdown - restart - logoff Windows via a bat file? -


i've been using remote desktop connection workstation, i'm not able use shutdown/restart function in start menu while doing this.

i've put few helpful options in answer below.

note: wanted make sure answers mentioned along own on this.

and here in no particular order.

here's how shutdown functions via batch file:

  • shutdown -r — restarts
  • shutdown -s — shutsdown
  • shutdown -l — logoff
  • shutdown -t xxxx number of seconds wait till shutdown/restart/logoff
  • shutdown -i — gives dialog box fill in function want use
  • shutdown -a — aborts previous shutdown command....very handy!
  • shutdown -h — hibernate. easy mistake - it's not help
  • shutdown -y — removes prompts @ shutdown (help not available in documentation)

additional options:

  • -f — force selected action
  • -t <seconds> — set time shutdown. use -t 0 "now"

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -