The Shutdown command under MS Windows 11, 10, .... + MS Server is one of the most popular PC shutdown or restart command lines!To use the command line, a generic command called "shutdown" is used, which has been incorporated into all Microsoft Windows editions. Its basic function is to turn off or restart the local or remote computer. If you use this command without parameters, the device will shut down or restart immediately.
Contents:1.) ... The examples for shutdown!
|
(Image-1) Shutdown command example "Restart in 3 seconds" |
2.) The shutdown parameters!
Microsoft Windows [version 10.0.19041.388]
(c) 2020 Microsoft Corporation. All rights reserved.
C: \ Users \ Nenad>shutdown
Usage: shutdown [/i | /l | /s | /sg | /r | /g | /a | /p | /h | /e | /o] [/hybrid] [/soft] [/fw] [/f]
[/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]
None Arguments indicates help. This matches with /?.
/? Displays help. This corresponds to an entry without options.
/i Displays a graphical user interface. This must be the first option.
/l Sign out. This cannot be used with the / m or / d options
.
/s Shuts down the computer.
/sg The computer will shut down. If the automatic restart
login is enabled, the next time the system is started, the user will be logged in automatically and the last interactive user will be locked out.
After logging in, all registered applications will be restarted.
/r Shuts down and restarts the computer completely.
/g The computer will completely shut down and restart. If automatic restart login is
enabled, the system will be automatically re-logged in
and the last interactive user will be locked out.
After logging in, all registered applications will be restarted.
/a Cancels the system shutdown.
Can only be used during the time-out period.
In combination with / fw, causes all outstanding starts in the firmware to be deleted.
/p
Turns off the local computer without a timeout warning.
Can be used with the "/ d" and "/ f" options.
/h Puts the local computer to sleep.
Can be used with the "/ f" option.
/ hybrid Shuts down the computer and prepares it for
quick start.
Must be used with the "/ s" option.
/ fw In combination with a shutdown option, causes the next boot in the
firmware user interface.
/e Documents the cause of the unexpected shutdown of
a computer.
/o Enters the menu with the advanced startup options
and restarts the computer.
Must be used with the "/ r" option.
/m \\ computer Specifies the target computer.
/t xxx Sets the shutdown timeout period
to xxx seconds.
Valid range: 0 - 315360000 (10 years), the
default value is 30.
If the timeout value is greater than 0, the / f parameter is
included.
/c "comment" Specifies the reason for the restart or shutdown.
A maximum of 512 characters is allowed.
/f Forces running applications to close without warning the user.
The / f parameter is included if a value greater than 0 is
specified for the "/ t" parameter.
/d [p | u:] xx: yy Specifies the reason for the restart or shutdown
.
"p" indicates that a restart or shutdown is scheduled.
"u" indicates that the cause is user-defined.
If neither "p" or "u" is specified, it is
not planned.
"xx" is the main reason number (positive whole
number less than 256).
"yy" is the minor reason number (positive whole number
less than 65536).
Reasons on this computer:
(E = expected U = unexpected P = planned, C = user-defined)
Type Main Beside Title
U 0 0 Other reason (not planned)
E 0 0 Other reason (not planned)
EP 0 0 Other reason (planned)
U 0 5 Other error : System no longer responded
E 1 1 Hardware: Maintenance (not planned)
EP 1 1 Hardware: Maintenance (planned)
E 1 2 Hardware: Installation (not planned)
EP 1 2 Hardware: Installation (planned)
E 2 2 Operating system: Recovery ( not planned)
EP 2 2 Operating system: recovery (planned)
P 2 3 Operating system: update (planned)
E 2 4 Operating system: reconfiguration (not planned)
EP 2 4 Operating system: reconfiguration (planned)
P 2 16 Operating system: Service Pack (planned)
2 17 Operating system: Hotfix (not planned)
P 2 17 Operating system: Hotfix (planned)
2 18 Operating system: Security patch (not planned)
P 2 18 Operating system : Security patch (planned)
E 4 1 Application: Maintenance (not planned)
EP 4 1 Application: Maintenance (planned)
EP 4 2 Application: Installed (planned)
E 4 5 Application: Does not react
E 4 6 Application: Unstable
U 5 15 System error : Abort error
U 5 19 security problem (not planned)
E 5 19 security problem (not planned)
EP 5 19 security problem (planned)
E 5 20 Network connectivity disconnected (not planned)
U 6 11 Power supply error: Cable removed
U 6 12 Power supply error: Environment
P 7 0 Shutdown of legacy API
C: \ Users \ Nenad>
FAQ 94: Updated on: 26 August 2023 10:48