Skip to main content

PsShutdown v2.52

By Mark Russinovich

Published: December 4, 2006

 Download PsTools (1.6 MB)




PsShutdown is a command-line utility similar to the shutdown utility from the Windows 2000 Resource Kit, but with the ability to do much more. In addition to supporting the same options for shutting down or rebooting the local or a remote computer, PsShutdown can logoff the console user or lock the console (locking requires Windows 2000 or higher). PsShutdown requires no manual installation of client software.



Just copy PsShutdown onto your executable path, and type psshutdown with command-line options defined below.


Using PsShutdown

See the February 2005 issue of Windows IT Pro Magazine for Mark's article that covers advanced usage of PsKill.

You can use PsShutdown to initiate a shutdown of the local or a remote computer, logoff a user, lock a system, or to abort an imminent shutdown.

Usage: psshutdown [[\\computer[,computer[,..] | @file [-u user [-p psswd]]] -s|-r|-h|-d|-k|-a|-l|-o [-f] [-c] [-t nn|h:m] [-n s] [-v nn] [-e [u|p]:xx:yy] [-m "message"]

-Displays the supported options.
computerPerform the command on the remote computer or computers specified. If you omit the computer name the command runs on the local system, and if you specify a wildcard (\\*), the command runs on all computers in the current domain.
@fileRun the command on each computer listed in the text file specified.
-uSpecifies optional user name for login to remote computer.
-pSpecifies optional password for user name. If you omit this you will be prompted to enter a hidden password.
-aAborts a shutdown (only possible while a countdown is in progress).
-cAllows the shutdown to be aborted by the interactive user.
-dSuspend the computer.
-eShutdown reason code.
Specify 'u' for user reason codes and 'p' for planned shutdown reason codes.
xx is the major reason code (must be less than 256).
yy is the minor reason code (must be less than 65536).
-fForces all running applications to exit during the shutdown instead of giving them a chance to gracefully save their data.
-hHibernate the computer.
-kPoweroff the computer (reboot if poweroff is not supported).
-lLock the computer.
-mThis option lets you specify a message to display to logged-on users when a shutdown countdown commences.
-nSpecifies timeout in seconds connecting to remote computers.
-oLogoff the console user.
-rReboot after shutdown.
-sShutdown without power off.
-tSpecifies the countdown in seconds until the shutdown (default: 20 seconds) or the time of shutdown (in 24 hour notation).
-vDisplay message for the specified number of seconds before the shutdown. If you omit this parameter the shutdown notification dialog displays and specifying a value of 0 results in no dialog.



Download PsTools
(1.6 MB)




Download PsTools
(1.6 MB)


PsShutdown is part of a growing kit of Sysinternals command-line tools that aid in the adminstration of local and remote systems named PsTools.

Runs on:

  • Client: Windows Vista and higher.
  • Server: Windows Server 2008 and higher.