Two Minute Drill: Shutdown.exe, Tsshutdn.exe and Psshutdown.exe
Published Mar 16 2019 03:27 AM 5,750 Views
First published on TECHNET on Feb 08, 2010

Hello all, Shipra here with a brief discussion of the various tools available to remotely shut down a system, and which is appropriate to use under which circumstances.

The first is Shutdown.exe , which originally shipped with the Windows 2000 Resource Kit . This is a good all-purpose tool for controlling machine shutdowns and reboots. However, it is not really capable of intelligently handling multi-user logons, so on a terminal server for instance, it will blindly reboot the server when you tell it to without warning to the terminal server users. This could cause possible data loss for the users if they have not recently saved their data. This tool is only available on the Windows 2000 Server Resource Kit, and not available for download, largely due to being superseded by our newer tool, which is…

Tsshutdn.exe , designed with terminal servers in mind, but works fine with other roles too. This tool uses functionality that makes it aware of multiple users and sessions, and will notify said users that the machine is being rebooted. This is of course invaluable in a terminal server environment and much preferable to blindly shutting down without regard to users. Using Tsshutdn.exe, the users get notified that the shutdown is coming, as well as prompted to save data within open applications. The basic syntax is:

Tsshutdn wait_time [ /server: server_name ] /reboot /powerdown /delay: log_off_delay /v

You can use the following parameters with the Tsshutdn command:

· wait_time : Use this parameter to specify the time period to wait (after users are notified) after which users are logged off from their sessions. The default setting is 60 seconds.

· /server: server_name : Use this parameter to specify the Terminal server that you want to shut down. If you omit this parameter, the current Terminal server is shut down.

· /reboot : Use this parameter to shut down and restart the Terminal server after client sessions are ended.

· /powerdown : Use this parameter to turn off the Terminal server (if the computer supports Advanced Power Management).

· /delay: log_off_delay : Use this parameter to specify the time period to wait (after users are logged off from their sessions) after which all processes end and the Terminal server shuts down. The default setting is 30 seconds.

· /v : Use this parameter to display information about the actions that are performed if you run this command

The third helpful utility is called Psshutdown.exe , from Sysinternals . This tool is similar to Tsshutdn.exe with the added functionality of being able to logoff a specific user, abort an imminent shutdown, lock or even hibernate the computer. More info on this tool and its capabilities is available on the Sysinternals website.

These tools all function in slightly different ways, so there may be no one-size-fits-all solution for your shutdown needs. I have seen cases where a non-terminal server was being rebooted using Shutdown.exe, but would not shut down properly. By switching to Tsshutdn.exe, everything worked as expected.

Thanks for your time, and I hope this information has been of help to you.


Share this post :

// <![CDATA[<br/><br/>// ]]>

Version history
Last update:
‎Mar 16 2019 03:27 AM
Updated by: