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
— restartsshutdown -s
— shutsdownshutdown -l
— logoffshutdown -t xx
—xx
number of seconds wait till shutdown/restart/logoffshutdown -i
— gives dialog box fill in function want useshutdown -a
— aborts previous shutdown command....very handy!shutdown -h
— hibernate. easy mistake - it's not helpshutdown -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
Post a Comment