Citrix Chained Reboot Scripts, now supporting Citrix Cloud, Citrix Virtual Apps and Desktops (CVAD), and XenApp/XenDesktop 5, 6, 6.5, and 7.x!

Share Button

Updated 2018.12.22: Revision 1.9 Now Supports Citrix Cloud!

One script now works with all current and modern versions of XenApp, XenDesktop, Citrix Virtual Apps and Desktops (CVAD), and Citrix Cloud Virtual Apps and Desktops Service from 7.0 and later, through 1811.

In zero-downtime 24/7 environments with shift employees, customers rarely want users to be notified of scheduled or mandatory XenApp server reboots. As a result, most of these environments have reboots disabled or this process is done manually. Unfortunately, this isn’t a good process since the XenApp servers are susceptible to memory leaks which can lead to failure and poor performance. By utilizing the included Chained reboot scripts, environments can take advantage of N+1 overallocation by processing a single server reboot while maintaining the user load on remaining systems. This has been done in such a way that users are not kicked off the system for scheduled reboots.  Instead, the server is removed from load balancing until all sessions have been logged off. Once all sessions have been logged off, the server will go down for a reboot.

Share Button
  1. WarrenWarren12-08-2014

    Dane, thanx for the work on this. We just started using this because we felt our profiles were being corrupt when our servers rebooted nightly at 3AM and users didn’t log off.
    We do have a couple of questions. We have tried this using scheduled task in couple different ways, starting at 8PM and upon restart of the Zone Controller server. it seems to run initially, but after the second loop it doesn’t. it disables logons but then doesn’t reboot the server and starts the timer over.
    also, how many powershell processes should we see if we have two WORKERGROUPS defined? we currently have 4 powershell processes running.

    thanx again for your work on this script for others!

  2. BrianBrian12-04-2014

    I am getting the following error in the event logs when I run the script. Not sure what is causing it.

    Unhandled error has occurred in main program: Cannot validate argument on parameter ‘Job’. The argument is null, empty, or an element of the argument collection contains a null value. Supply a collection that does not contain any null values and then try the command again.

    Thanks again

  3. MichaMicha12-01-2014

    @Cumhur Uerel,
    There is a bug in the script (at least in XD7) – search for $intHours.Hours and replace it by $intHours.TotalHours and the script will work as supposed.

  4. Cumhur UerelCumhur Uerel11-27-2014

    I implemented the script in our lab environment. I set FARMLOOPINTERVAL to 24h. After starting of the scheduled task all server have restarted once as expected. But after then looping counts down from 24 to 0 and starts over again and again. Did I something wrong?

1 14 15 16 17 18 25

Leave a Reply to Dane Young Click here to cancel reply.