Today’s writing discusses the “shutdown commands” on Windows, explaining the following content:
- How to Initiate an Immediate Shutdown?
- How to Force Shutdown the System in Windows?
- How to Shutdown a Remote System Using the CMD on Windows?
- How to Schedule a Shutdown in Windows?
- How to Cancel a Scheduled Shutdown?
How to Initiate an Immediate Shutdown?
The “shutdown” command can be used with the “/s” flag to shut down a Windows system immediately. To do so, open the “Command Prompt” by pressing the “Windows” key, enter “CMD”, and trigger “Run as administrator:
Now, use the following command, which will result in an immediate shutdown of the current system:
Right after the “shutdown /s” command is executed, the following warning popup will appear that implies that after 10 seconds, the system shall shutdown:
How to Force Shutdown the System in Windows?
If apps/software/services prevent the shutdown, you can use the “/f” flag to force running them to close, triggering the shutdown. Use the following command to “force shutdown” the system:
Once executed, after 15 seconds, the system will forcefully shutdown:
How to Shutdown a Remote System Using CMD on Windows?
To “shutdown a remote system” on the network, use the “/m” flag followed by the remote system’s name. You can also broadcast a message to users before shutting down using the “/c” flag followed by the message. Combining both flags, use the following command to shut down the remote system named “DESKTOP-LBSE5AD”:
How to Schedule a Shutdown in Windows?
Microsoft added the “shutdown command” with the parameters to “schedule a system’s shutdown”. This can be useful when you want to shut down the system at a specific time, for example, when you leave the office or before going to bed. To do so, you must specify the scheduled time (in seconds):
In the above command:
- The “/s” parameter specifies the shutdown of the system.
- The “/t” parameter refers to the time in seconds until shutdown.
For instance, to schedule a shutdown in “10 minutes (600 seconds)”, use the following command:
Once the command is entered, a message confirming the scheduled shutdown time will appear on the screen:
How to Cancel a Scheduled Shutdown?
To “cancel a scheduled shutdown” that was initiated using the “shutdown” command, the “/a” flag is used in this way:
You will see a popup in the “Windows notification center” implying that the “Logoff is canceled”:
Conclusion
Microsoft added the “shutdown” command in Windows that is specifically used to shut down the system, whether local or remote. The flags, such as “/t”, can be specified that indicates the time before the system is shut down, which can also be canceled using the “/a” flag. To “shut down a remote system”, the “/m” flag is used, while the “/c” flag is used to send a warning message to remote users about their system shutting down. This guide explained the “shutdown commands” in Windows.