Sysinternals/Pstools/psshutdown
Jump to navigation
Jump to search
You are here: | psshutdown
|
Description
PsShutdown is part of the PsTools toolkit developed by Sysinternals. Shutdown, logoff and power manage local and remote systems.
Installation
PsShutdown is part of the PsTools suite. To install it, please refer to this section.
Usage
Syntax
psshutdown -s|-r|-h|-d|-k|-a|-l|-o [-f] [-c] [-t [nn|h:m]] [-v nn] [-e [u|p]:xx:yy] [-m "message"] [-u Username [-p password]] [-n s] [\\computer[,computer[,...]|@file]
Options
- -a
- Abort a shutdown (only possible while countdown is in progress)
- -c
- Allow the shutdown to be aborted by the interactive user
- -d
- Suspend the computer
- -e
- Shutdown reason code (available on Windows XP and higher).
- Specify 'u' for unplanned 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)
- -f
- Forces running applications to close
- -h
- Hibernate the computer
- -k
- Poweroff the computer (reboot if poweroff is not supported)
- -l
- Lock the computer
- -m
- Message to display to logged on users
- -n
- Specifies timeout in seconds connecting to remote computers
- -o
- Logoff the console user
- -p
- Specifies optional password for user name. If you omit this you will be prompted to enter a hidden password.
- -r
- Reboot after shutdown
- -s
- Shutdown without poweroff
- -t
- Specifies countdown in seconds until shutdown (default is 20) or the time of shutdown (in 24 hour notation)
- -u
- Specifies optional user name for login to remote computer.
- -v
- Display 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 omits the dialog.
- computer
- Shutdown the computer or computers specified
- @file
- Shutdown the computers listed in the file specified
Examples
From the requesting computer:
C:\pstools>psshutdown \\192.168.1.27 -u pilou -p oops PsShutdown v2.52 - Shutdown, logoff and power manage local and remote systems Copyright (C) 1999-2006 Mark Russinovich Sysinternals - www.sysinternals.com 192.168.1.27 is scheduled to power off in 00:00:20.
On the targeted computer: