Wilco van Bragt - LinkeIn Wilco van Bragt - Twitter rssa 

Reboot Terminal Server Utilities

As explained in this article periodically reboots on a Terminal Server are a best practice. This can be achieved using several techniques and products. For example Citrix Presentation Server/XenApp has built in features, Microsoft has the tsshutdwn.exe available and there are some commercial products like ShutdownPlus TSE. There are also some freeware utilities available like Centralis Centinel and CTRL+ALT+DEL TSReboot.

In this article I will describe TSShutdn, Citrix Reboot Feature, Centinel and TSReboot.

TSShutdn




TSShutdn is available in Windows 2003 by default.  I could not find anything similar on Windows 2008. If somebody knows what happened to TSShutdn in Windows 2008, please contact me.

TSShutdwn is a pretty useful utility which offers many options. By typing tsshutdn /? all available options will be displayed.

Image

As you can see in above displayed screenshot it is possible to reboot the servers from another system. I really like the wait_time feature so you can configure the time users have to close their session. Using the /DELAY option you can specify the time to wait before the sessions are logged of. It is a plus that before the reboot is initiated the sessions are logged of in a decent way. Users will get a message warning that the server will reboot in the defined timeframe. Actually this tool offers actually all needed features for a basic reboot. Earlier versions were not fully stable, but the current versions are working fine.

Citrix Reboot Feature

For several versions Citrix is providing a Reboot Feature in their product. Also their first version was not functioning properly, but nowadays this option is pretty stable. In every new version of Citrix Presentation Server/XenApp the functionality is changed. In Citrix Presentation Server 4.5 you can schedule a reboot day and reboot scheme. With the advanced options you can configure warning messages to the users and disable logons in advance (remember that disconnected session cannot reconnect from that moment). All options are displayed in figure 2. As you probably notice this option is available out of the "old" Citrix Presentation Server console.

Image

In XenApp 5 (for Windows 2008) the option has been moved to the Citrix Access Suite Console and configuration is changed into a wizard. The option for configuring the warning messages is also moved to the farm level so these properties are configured exactly the same for all servers. New in XenApp is the new option to define a reboot window instead of a fixed time as displayed in figure 3.

Image

When I was taking one of the Citrix XenApp beta exams I got a question about a Schedule Interval. I was not aware of this feature and also the administrator guide was not mentioning anything about it. After reading the wizard again carefully I saw that the text was mentioning servers (so more than one logically). When I selected more servers in the same time and started the wizard both fixed times (with intervals) can be set as the reboot window.  It's a pity that this is not documented yet and that the configuration is not stored centrally, but is applied on every server personally. So it is possible to add servers to the restart configuration. 

Centralis Centinel

Centinel is just as the TSShutdn a single executable. The tool can only reboot the server it is stored on the local disk (no remote option) in a directory available within the PATH variable. In comparison with the other tools the centinel has the option to postpone the reboot if still users are connected to the system and the possibility to start a script before the reboot is started. Using the -r option a number of retries can be configured to check if there are users online, while the -d option ignores disconnected sessions. This method has both advantages and disadvantages.

TSReboot

TSReboot is created by the guys of CTRL-ALT-DEL, which has made lots of freeware tools for Terminal Server Infrastructures. In this article I already described a couple of those tools. In comparison with the other tools the tools offers the possibility to reboot ALL servers within the current domain at once (some servers can be excluded using the /EXCLUDE parameter). Also a time can be specified when the reboot is started after the notification of the users. Also a single server can be restarted from another system.

Image

Conclusion

There are several utilities available for rebooting a Terminal Server, which I described in this article (and probably there are more tools available). Every tool or option has his advantages and disadvantages depending on the needs and wishes of the organization. Because I would to do some more checks before a server is rebooted (For example determine if enough servers are available as described in this article) I normally use a command line utility. Personally I think tsshutdn offers all the functionalities I need, but in large environments TSReboot can be useful to set-up some server groups (using the exclude option), although this can be scripted easily for tsshutdn. I only wonder where this utility is for Windows 2008.