PsShutdown – Windows CMD Command
Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
Initiate a shutdown/reboot of a local or remote computer, logoff a user, lock a system.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
Syntax psshutdown [[\\computer[,computer[,..]]] | @file [-u user [-p passwd]]] -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"] Options: computer The computer on which the user account resides. Default=local system a wildcard (\\*), will affect all computers in the current domain. -p passwd Specify a password for user (optional). Passed as clear text. If omitted, you will be prompted to enter a hidden password. -u user Specify a user name for login to remote computer(optional). @file Execute the command on each of the computers listed in the file. -a Cancel a shutdown (only possible while a countdown is in progress) -c Allow the shutdown to be cancelled by the interactive user -d Suspend the computer -e [u|p]:xx:yy Shutdown reason code, 'u' = user, 'p'= planned shutdown. xx is the major reason code (must be less than 256) yy is the minor reason code (must be less than 65536) -f Force all running applications to exit during the shutdown instead of giving them a chance to gracefully save their data. -h Hibernate the computer. -k Poweroff the computer (reboot if poweroff is not supported). -l Lock the computer On Vista and greater this requires the username and password of the account to lock Even with a password, the default permissions do not allow the screen to be locked. -m "message" DIsaply a message to logged-on users when a shutdown countdown commences. -n Timeout in seconds connecting to remote computers. -o Logoff the console user. -r Reboot after shutdown. -s Shutdown without poweroff. -t Countdown in seconds until the shutdown (default: 20 seconds) or the time of shutdown (in 24 hour notation). -v Display message for the specified number of seconds before the shutdown. default= display a shutdown notification dialog, specifying a value of 0 results in no dialog. -accepteula Suppress the display of the license dialog. - Help, display the supported options. |
This tool allows administrators to create a batch file that will run against multiple computers to perform a mass change of the administrator password.
PsShutdown has two features not found in the SHUTDOWN command:
- It will (by default) force the shutdown/restart of remote PCs so an interactive user cannot cancel the shutdown.
- Multiple remote PCs can be targeted at once ().
When launched for the first time, PsShutdown will create the regkey
HKCU\Software\Sysinternals\PsFile\EulaAccepted=0x01
1 2 3 4 5 6 7 8 9 |
Examples: Reboot \\workstationF4T as part of an OS upgrade: psshutdown \\workstationF4T -r -e p:2:3 Shutdown all the computers listed in a file (one per line): psshutdown @c:\scripts\computers.txt -s |