shutdown: shutdown


 


... The examples for the command "shutdown"
... "shutdown" Excerpt from Microsoft Windows Help
... Important information, tips for the "shutdown" command

The command: "shutdown" is on Windows 12, 11, 10, .. , MS Server 2025, 2022, 2019, .. available

The examples for the command "shutdown"

Here are some examples of the `shutdown` command in the Command Prompt (CMD): Example 1: Shut down computer:

shutdown /s /f /t 0

- `/s`: This parameter indicates that the computer should be shut down. - `/f`: Force close all applications without warning. - `/t 0`: Sets the countdown timer to 0 seconds, meaning the computer will shut down immediately. Example 2: Shut down computer with message and time delay:

shutdown /s /f /t 300 /c "The computer will shut down in 5 minutes. Save your work!"

- `/t 300`: Sets a countdown timer of 300 seconds (5 minutes). - `/c "message"`: Adds a custom message to the shutdown command that is displayed on the screen. Example 3: Restart computer with message and time delay:

shutdown /r /f /t 1800 /c "The computer will restart in 30 minutes. Save your work!"

- `/r`: This parameter indicates that the computer should be restarted. - `/t 1800`: Sets a countdown timer of 1800 seconds (30 minutes). - `/c "message"`: Add a custom message to the restart command. Example 4: Cancel a scheduled shutdown or reboot:

shutdown /a

- `/a`: This parameter is used to cancel a previously scheduled shutdown or restart. Example 5: Shutting down and restarting a remote computer:

shutdown /s /f /m \\computername

- `/s`: The remote computer is shutting down. - `/f`: Force close all applications without warning. - `/m \\computername`: Specifies the name of the remote computer. These examples show different use cases of the `shutdown` command in the command prompt. Note that shutting down and restarting the computer affects all running applications and open files, so this should be done with caution and with appropriate notification. Besides the basic shutdown and restart functions, there are also some advanced options and parameters that can be used with the `shutdown` command. Here are some other important options: Example 6: User logout:

shutdown /l

- `/l`: This parameter logs out the current user. Example 7: Shutting down and turning off the computer:

shutdown /s /hybrid /f /t 0

- `/hybrid`: Turns off the computer and enables the hybrid boot option for faster boot times. Example 8: Shutting down and installing Windows updates:

shutdown /s /f /t 0 /dp:4:1

- `/dp:4:1`: Sets Windows updates to be installed and the computer to be shut down. Example 9: Aborting a remote shutdown:

shutdown /a /m \\Remote Computer

- `/a`: Cancel previously scheduled shutdown or reboot. - `/m \\Remote-Computer`: Specifies the name of the remote computer. Example 10: Display of system uptime:

shutdown /s /f /t 0 /c "Shut down computer" && systeminfo | find "System Boot Time"

- This command shuts down the computer and then displays the system uptime. It is important to choose the appropriate options carefully to avoid unwanted effects. Using the `shutdown` command requires administrative privileges, and certain options may affect other users or system health. Therefore, the command should be used with caution.

"shutdown" Excerpt from Microsoft Windows Help

Microsoft Windows [Version 10.0.19045.3693]
(c) Copyright 1985-2023 Microsoft Corp.

C:\\WINDOWS>

Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c 
"comment"] [-d up:xx:yy]

No argsDisplay this message (same as -?)
-iDisplay GUI interface, must be the first option
-lLog off (cannot be used with -m option)
-sShutdown the computer
-rShutdown and restart the computer
-aAbort a system shutdown
-m \\computernameRemote computer to shutdown/restart/abort
-t xxSet timeout for shutdown to xx seconds
-c "comment"Shutdown comment (maximum of 127 characters)
-fForces running applications to close without warning
-d [u][p]:xx:yyThe 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)

Important information, tips for the "shutdown" command

When using the `shutdown` command, there are some important points you should pay attention to to avoid unwanted effects: 1. Remote Computer Permissions: - If you want to run the command on a remote computer, make sure that you have the necessary permissions and that the remote computer accepts the command. 2. Understanding Hybrid Start Option: - When using the `/hybrid` option, you should be aware that this does not completely shut down the computer, but puts it into a faster boot mode. This may impact some system configurations. 3. Show system uptime: - The example for displaying the system uptime (`systeminfo | find "System Boot Time"`) will no longer work after shutdown because the computer is no longer accessible at this point. 4. Shutdown and install Windows updates: - When shutting down using the `/dp:4:1` option for Windows updates, you should ensure that important updates can be installed without causing problems. 5. Cancel Shutdown or Restart: - If you want to cancel a shutdown or reboot, use the `/a` parameter. This can be helpful if you accidentally started an action. 6. Admin rights: - The `shutdown` command requires administrative privileges to run properly. Make sure you open Command Prompt as an administrator. 7. Open Applications: - Before shutting down or restarting the computer, check whether all important applications and files are saved as the command closes all running applications. 8. Plan shutdown actions carefully: - If you use the `shutdown` command with a time delay, make sure you have enough time to save your work and exit the computer before the process completes. It is important to emphasize that shutting down and restarting the computer affects all running processes and users. Therefore, it is advisable to use the `shutdown` command carefully and ensure that you select the correct options for your specific use case.


Deutsch
English
Español
Français
Italiano
日本語 (Nihongo)
한국어 (Hangugeo)
汉语 (Hànyǔ)
Türkçe
Português
Português
Svenska
Norsk
Dansk
Suomi
Nederlands
Polski









Windows-10


... Windows 10 FAQ
... Windows 10 How To


Windows 10 How To


... Windows 11 How To
... Windows 10 FAQ



The command shutdown - shutdown

HTTP: ... console/en/156.htm
0.109
7957
How to see all running apps on The Samsung Galaxy! The 10 Best PowerShell Commands for Windows Server? Wo sind die Standard Bilder für Benutzer in Windows 8.1 / 10 (Verzeichnis)! Hilfe, wo kann man das Windows 8 und 8.1 ausschalten, bzw. herunterfahren? Start an incognito, anonymous or private browsing via Chrome on Windows! Is it true that Windows 12 can only be installed on SSDs? Formatting or Quick Formatting? Desktop Verknüpfung zum Start des Task Manager im minimierten Modus (To-Tray)! What is the situation with data security and privacy in Windows 12? Will Windows 12 be a free upgrade for Windows 11 users?



(0)