Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the hueman domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/future4tech/public_html/wp-includes/functions.php on line 6114
PsShutdown – Windows CMD Command - Future4Tech

PsShutdown – Windows CMD Command

Initiate a shutdown/reboot of a local or remote computer, logoff a user, lock a system.

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

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

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *


Notice: ob_end_flush(): Failed to send buffer of zlib output compression (0) in /home/future4tech/public_html/wp-includes/functions.php on line 5464