Home > Commands N-Z > Commands T

TSSHUTDN


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Use the tsshutdn command to shut down and restart a Terminal server. If you do so, users are notified that their sessions will end and the server is shut down in a controlled manner. Microsoft recommends that you use the tsshutdn command instead of the Shut Down option on the Start menu to shut down a Terminal server. If you use the Shut Down option on the Start menu, users are not notified before their sessions are ended, and they may experience data loss on the client computer.


Syntax

TSSHUTDN /?

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


Parameters
wait_time (NT2000)
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.

Switches
/? (NT2000)
Displays help.
/delay:log_off_delay (NT2000)
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.
/powerdown (NT2000)
Turn off the Terminal server (if the computer supports Advanced Power Management).
/reboot (NT2000)
Shut down and restart the Terminal server after client sessions are ended.
/server:server_name (NT2000)
Specify the Terminal server that you want to shut down. The default setting is to shut down the current Terminal server.
/v (NT2000)
Display information about the actions that are performed.

Related

The freeware SHUTDOWN utility by Andrej Budja.


Notes

You must have administrative credentials to run TSSHUTDN.


Using in the Start menu is not recommended for shutting down a terminal server. This method does not notify users before ending their sessions.


All connected sessions are notified that they are going to be shut down. Sessions that have applications with open files prompt the user to save the files. After initiating the logoff command, TSSHUTDN waits a specified interval (set by /delay) before ending all processes.


TSSHUTDN does not reboot the terminal server unless the /reboot option is specified.


Microsoft Windows Remote Desktop TSShutdn.exe Unauthenticated Shutdown DoS
OSVDB ID: 15011
Disclosure Date: Mar 25, 2005

Description: Microsoft Windows Remote Desktop contains a flaw that may allow a remote denial of service. The issue is triggered if a users belonging to the same domain of the target machine and uses the TSShutdn.exe utility trying to shut down the server. There is no authentication check so the target machine will shut down.

Solution: Apply Windows XP SP2, as it has been reported to fix this vulnerability. Alternatively, Microsoft Corporation has released a patch for SP1 to fix this vulnerability.


Examples

To end all client sessions 60 seconds after notification, and then shut down the current terminal server 30 seconds after all of the users are logged off, type the following command at the command prompt, and then press ENTER:

    TSSHUTDN /v

Users receive the following message:
System is shutting down in 60 seconds.

To end all client sessions 5 minutes after notification, and then shut down and restart the Terminal server 1 minute after all of the users are logged off, type the following command at the command prompt, and then press ENTER:

    TSSHUTDN 300 /reboot /delay:60 /v

Users receive the following message:
System is shutting down in 300 seconds.

To end all client sessions 2 minutes after notification, and then shut down and restart a Terminal server named "Server8" 20 seconds after all of the users are logged off, type the following command at the command prompt, and then press ENTER:

    TSSHUTDN 120 /server:server8 /delay:20 /v

Users receive the following message:
System is shutting down in 120 seconds.


Errorlevels

none.


Availability
External
DOS
none
Windows
none
Windows NT
NT2000 NTXP NT2003

Last Updated: 2006/07/01
Direct corrections or suggestions to: Rick Lively 1