shut down the system with warning 



shutdown [-S hostname] [-q] [-h | -r] [time [ warning-message ...]]

shutdown -c [-S hostname]


The shutdown utility schedules the shutdown of a local or remote system at (or after) a specified time and warns all users logged into that system of the upcoming shutdown. You must have administrator privileges on the system being shut down to use this utility.

The time argument indicates when to shut the system down and can be one of the following:


shuts down the system immediately.


shuts down the system in number seconds.


shuts down the system at the specified date and time.

Any additional arguments following time comprise an additional warning-message that is broadcast to all users along with the warning of the upcoming shutdown.



cancels a system shutdown scheduled by an earlier shutdown command.


shuts down the system with no restart. This is the default behavior if the -h or -r option is not specified.


does not prompt the user to save when shutting down user programs.


restarts system immediately after it is shut down.

-S hostname 

shuts down the remote computer named hostname. If this option is not specified, the local system is shut down.


Possible exit status values are:


Successful completion.


An error occurred.


Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.


PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition



PTC MKS Toolkit 10.4 Documentation Build 39.