This guide shows you how to use the shutdown command and its various
switches to shutdown, restart, or log off local or remote computers
from the command prompt and dialog window.
The shutdown command has a few options called switches. You can always see them by typing shutdown -? in the command prompt if you forget any of them.
-i: Display GUI interface, must be the first option
-l: Log off (cannot be used with -m option)
-s: Shutdown the computer
-r: Shutdown and restart the computer
-a: Abort a system shutdown
-m \\computername: Remote computer to shutdown/restart/abort
-t xx: Set timeout for shutdown to xx seconds
-c “comment”: Shutdown comment (maximum of 127 characters)
-f: Forces running applications to close without warning
-d [u][p]:xx:yy: The reason code for the shutdown u is the user code p is a planned shutdown code xx is the major reason code (positive integer less than 256) yy is the minor reason code (positive integer less than 65536)
Note - I’ve noticed using a switch with a – sign doesn’t work sometimes. If you are having trouble try using a / in place of – in your switches.
Type shutdown -i and press enter. A window similar to the one below will popup.
Add Computer or List of computers by clicking Add button.
Given figure is an example for shutting down a computer after displaying warning message 20 seconds for its users.
Note - To execute shutdown down command user should have administrative privileges in resulting computer.
Command Prompt
The shutdown command has a few options called switches. You can always see them by typing shutdown -? in the command prompt if you forget any of them.
-i: Display GUI interface, must be the first option
-l: Log off (cannot be used with -m option)
-s: Shutdown the computer
-r: Shutdown and restart the computer
-a: Abort a system shutdown
-m \\computername: Remote computer to shutdown/restart/abort
-t xx: Set timeout for shutdown to xx seconds
-c “comment”: Shutdown comment (maximum of 127 characters)
-f: Forces running applications to close without warning
-d [u][p]:xx:yy: The reason code for the shutdown u is the user code p is a planned shutdown code xx is the major reason code (positive integer less than 256) yy is the minor reason code (positive integer less than 65536)
Note - I’ve noticed using a switch with a – sign doesn’t work sometimes. If you are having trouble try using a / in place of – in your switches.
2. Dialog Window
Type shutdown -i and press enter. A window similar to the one below will popup.
Add Computer or List of computers by clicking Add button.
Given figure is an example for shutting down a computer after displaying warning message 20 seconds for its users.
Note - To execute shutdown down command user should have administrative privileges in resulting computer.
No comments:
Post a Comment