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. StephenStephen01-17-2013

    Great script youngtech but I stuck on something I hope you can help with. The script runs correctly the 1st time but when it is time to repeat after 24 hours, all the log file shows is “It has been 0 hours since last loop for ‘AllServers’. Waiting for another 24 hours.”. But the script never runs through the process again unless I kill the powershell process. I am on Win2008 R2 and XenApp 6.5.

    What am I missing?

    • Dane YoungDane Young01-17-2013

      Hi Stephen,

      I received your feedback on my Rolling Reboot blog post. I’m wondering if you have had any further success with the script or to see if it’s still failing? If you are willing, I’d love to take a couple minutes to look over your farm and XenApp environment to see if there’s anything obvious that I may be missing in my approach?

      Let me know if you are interested, I’m constantly trying to improve the tool and would love to see why it’s failing.
      Thanks,
      –youngtech
      dane@itvce.com

      • Hi Dane,

        I’m loving your script and it is definitely the right tool for the right job. Thanks for putting it together. I am, however, having the same issue that has been mentioned a couple of times in this thread. The first time the script is run, it cycles through and reboots the servers, however, upon successive countdowns once it reaches the time that the scheduled task is set to kick in, the countdown starts all over again, instead of continuing with the countdown. I have my FarmLoopInterval set to 72 hours instead of 24 hours, but it appears that even though the task scheduler recognizes an instance is already running and does not execute the task again, the countdown timer is reset for some reason.

  2. StephenStephen01-15-2013

    Great script YoungTech. Hoping you can help me figure out why the script does not restart the loop after the FarmLoopInterval timeout has expired (24 hours). I see in the log that it counts down to zero, “It has been 0 hours since last loop for ‘AllServers’. Waiting for another 24 hours.” But nothing happens. Shouldn’t the script start the reboot cycle again?

    What am I missing?

    • Dane YoungDane Young12-04-2014

      Hi Stephen,

      This should be resolved.

      Thanks!
      -youngtech

  3. murdamurda01-09-2013

    Hi Dane,

    Since the “Nologon” policy is enabled on the server and users are working on the “nologon” server.
    New applications which are launched are opening on a new citrix server meaning the users needs to wait the login of every newly opened application.
    Is there a way that users who’re currently working on the “nologon” server can still launch application on that server?

    regards,

    murda

    • Dane YoungDane Young01-17-2013

      Murda,

      Unfortunately I am not aware of an easy way to accomplish what you’re looking for. I will let you know if I find a solution for this, but generally new application launches will be shifted in order to bleed off the server of active sessions.

      Thanks,
      –youngtech

  4. AndreAndre01-08-2013

    Hi,

    I am experiencing the following issue using the reboot script (build 2012.11.26 rev 6) in a xenapp 6.5 farm :

    One we start running the script it reboots all the servers once as planned (24hrs cycle). But after the first cycle of 24 hrs we get the following msgs :

    It has been 23 hours since last loop for ‘SessionHosts’. Waiting for another 1 hours.
    It has been 0 hours since last loop for ‘SessionHosts’. Waiting for another 24 hours.
    It has been 1 hours since last loop for ‘SessionHosts’. Waiting for another 23 hours.

    And no more reboots occur. If I stop and start the script the reboot cycle works as planned, but only once and then we get the above msgs without any more reboots.

    • Dane YoungDane Young01-17-2013

      Hi Andre,

      I received your feedback on my Rolling Reboot blog post. I’m wondering if you have had any further success with the script or to see if it’s still failing? If you are willing, I’d love to take a couple minutes to look over your farm and XenApp environment to see if there’s anything obvious that I may be missing in my approach?

      Let me know if you are interested, I’m constantly trying to improve the tool and would love to see why it’s failing.
      Thanks,
      –youngtech
      dane@itvce.com

  5. Maria OliveraMaria Olivera01-07-2013

    ‘Created by Dane Young, Entisys Solutions Copyright 2010, 2011
    ‘Build 2011.12.05 Revision 5

    In order to be used in a production environment, do we need to paid to use this script? License?

    • Maria OliveraMaria Olivera01-07-2013

      What’s the license agreement?

      • Dane YoungDane Young01-17-2013

        Maria,

        No license agreement required. Simply leave my name and credit in the header and footer of the script. Free for personal or professional use.

        Thanks
        –youngtech

1 7 8 9 10 11 25

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