Name
Shutdown —
\windows\system32\shutdown.exe
Synopsis
Shut down a computer from the command prompt or remotely via Telnet.
To Open
Command Prompt →
shutdown
Usage
shutdown [-command
] [-f] [-m \\computername
] [-txx
] [-c "comment
"] [-d [u
][p
]:xx
:yy
]
Description
Shutdown is used to perform a graceful shut down of the computer from the command line; it is useful if you wish to automate the shutdown of computer or if you need to shutdown and you don’t have access to the Start menu. This tool can be used to shut down the computer with a Windows shortcut, from a script or batch file, via Scheduled Tasks, or remotely using a Telnet client.
Shutdown uses the following command-line parameters:
-
-command
Command can be one of the following:
-
-i
Displays the same Shut Down window used by going to Shart → Shut Down. If the
-i
option is specified with other options, it must be the first option.-
-l
Logs off (cannot be used with
-m
option). Whether a logon window is shown depends on system preferences.-
-s
Shuts down the computer.
-
-r
Restarts the computer.
-
-a
Aborts a system shutdown in progress; only applicable if using a timed shutdown and there’s enough time to type
shutdown -a
.-
-m \\
computername
Shuts down a remote computer; works with all commands except for
-l
. Note that you must have administrator privileges on the remote computer.- -t xx
Sets a timed countdown before the shutdown is performed. This command gives other users who are currently logged in time to save their work and log out. The default ...
Get Windows XP in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.