Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Windows cmd.exe Command-Prompt ► ««« »»»

Understand the shutdown command under MS Windows!


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!
2.) ... The shutdown parameters!


See also: ►► Shortcut Shutdown !

1.) The examples for shutdown!

Example-1:  Forcing the computer to log off!


C:\Windows\System32>shutdown / l / f / t 30 / c "Log off in 30 seconds"


Example-2:  Force shutdown on the computer!


C:\Windows\System32>shutdown /s /f /t 600 /c "Shutdown after installation in 10 minutes"


Example-3: Initiate the restart immediately 


C:\Windows\System32>shutdown /r /f /t 3  /c "Restart test 1 in 3 seconds"



(Image-1) Shutdown command example "Restart in 3 seconds"
Command shutdown example restart 3 seconds!

-
▲ Back to the top ▲


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: 1 December 2022 11:33 Windows
Windows-Console

Find out the computer name via the command prompt or Powershell!


Its easy to find out the computer name using the command prompt or Powershell commands on Windows 11, 10, etc. You can determine your computer name
Windows-Console

Activate and deactivate Remote Desktop via command line!


Its easy to enable and disable Remote Desktop from the command line on MS Windows 11, 10, etc. and Server OS The remote desktop can be turned off,
Windows-Console

Find out with PowerShell what is preventing shutdown and standby!


It is easy to find out with PowerShell which app or program is preventing shutdown, standby or hibernation on Windows 11, 10, etc. With all Microsoft
Windows-Console

Delete partition with Diskpart under Windows 11, 10, ... and MS Server!


It is easy to delete a partition with Diskpart on all Windows 11, 10, Desktop and MS Server 2022, 2019, operating systems Contents: 1. Deleting
Windows-Console

Command line to delete empty folders Windows 11, 10, ....!


If you want to delete empty folders via command line, here is the command for all Microsofts Windows 11, 10, Desktop and MS Server OS 1. Hold down
Windows-Console

Set maximum password age / expiration date via Windows PowerShell!


Set the maximum password age or the expiration date via Windows PowerShell under MS Windows 11, 10, Desktop and MS Server If your computer is running
Windows-Console

Change Windows 11, 10, ... time zone via Terminal, Powershell, command prompt!


Its easy to change Windows 11, 10, or MS Server time zone via Terminal, Powershell, command prompt Changing the Windows time zone is sometimes faster

»»

  My question is not there in the FAQ
Asked questions on this answer:
Keywords: windows, 11, 10, console, understand, shutdown, command, server, popular, restart, lines, line, Questions, Answers, Software




    

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + Q-Dir
  + DirPrintOK
  + FontViewOK
  + MeinPlatz
  + DesktopOK
  + ProcessKO
  + WinBin2Iso
  + ThisIsMyFile
  + TheAeroClock
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Windows 2021 | Windows 10 | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2023 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu
0.077


► Disable automatic updates, yes or no! ◄

► How can I change the language in the mouse pointer stick? ◄

► Can I encrypt certain folders / files in Windows 11? ◄

This website uses cookies to ensure you get the best experience on our website more Infos & Privacy Policy
....