Citrix Chained Reboot Scripts, now supporting Citrix Cloud, Citrix Virtual Apps and Desktops (CVAD), and XenApp/XenDesktop 5, 6, 6.5, and 7.x!
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.







great stuff dane. I am trying to get a copy of the XA5 VBScript but there seems to be a problem with the download link. Not sure if this is the correct place to mention. I appreciate the work. Thanks.
-Aaron
Hi Dane,
I have found the error not booting after FARMLOOPINTERVAL has elapsed. On Line 204 (while ($intHours.Hours -lt $FARMLOOPINTERVAL) # Compare to see if the time elapsed is less than the farm loop interval)
instead of using $intHours.Hours which will never be greater than 23, $intHours.TotalHours should be used.
best regards
Hanspeter
Great script working really well, I do have a suggestion.
It would be good if there was an option to use the server’s uptime to select the next server to reboot rather than alphabetical order.
For example I am rebooting 20 server with your script the other day the script has got to server 18 I am had to reboot the server hosting the script, so when the script started up again it started back at number 1 whereas if was using the uptime it would have carried off where it left off rebooting server 19 next.
Also there are times when I need to manually reboot a server say server 2 has been rebooted by the script so 3 is next but I have manually rebooted 3, the script may as well skip 3 and it would if it used the uptime.
Thanks
Phil
Hello Dane
I have used a modification of this script for quite a while now in a XenApp 5 Environment, great work. I anted to have a look on the latest revision (XenApp5_Citrix_Rolling_Reboot_Rev5) unfortunately I’m not able to download it.
The farm consists of 120 Servers separated into 2 zones splitted by firewall. During the night I have only little load compared to what I have during the day. I have to reboot all servers every 2 days. Therefore I have modified the script to run just on a single server and I trigger it from an additional Script which takes the servernames from an input file. This way I can disable half of the farm at 5pm and all servers will reboot during the night as soon as the users are logged off. Since we use published desktops, the way your script works does not fit for me, because it would take too long to cycle through the whole farm. The problem now is, that after about 30 scheduled tasks no more tasks will be scheduled.
Therefore I’m looking for a new method. to disable a group of servers (seperate inputfile, group in console, etc) and then let the script cycle until all users are logged off and then boot the server.
in cas you have any ideas I would appreciate to hear.
best regards
Hanspeter