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.
Trying to implement this into our XenApp 6.5 farm, the script will go through and process servers in the farm disabling logons but never actually reboots the servers.
Hi Dane, Great script and works 99.999%
The problem I am having is that I cannot only get it to reboot a single server per delivery group at a time, How can i get it to reboot more servers?
I have 220 (110 per site) servers that I need to run this against and so far has taken 4 hours and only done and reboot 87 per site.
I have the the reboot interval set to 5 and the maxservers set to 10 but it only seems to do one at a time and does not move on until it is finsihed
Thanks
I am having the same issue, XenApp 7.6 LTSR CU1. It will only reboot one server at a time, even though I have it set to 5 for max servers. I tested it in my lab which is on the same version and its doing the same thing. This worked previously with the original 7.6 release. Is there anyway we can get an updated script that fixes this functionality? It would be greatly appreciated!
Thanks!
How do you handle prelaunch sessions? I would like to make a distinction between ACTIVE sessions and prelaunch sessions.
Great question! Not sure how these sessions would be registered, but I’m sure we can figure out a way to adjust the script to handle these types of sessions. Let me know if you need more help researching adjustments to the script.
Thanks!
–youngtech
Rather than check for the active sessions, check for active applications. If you replace $session value with the return of “(Get-BrokerSession | ? { $_.AppState -eq “Active” }).count” then a value of 0 indicates that no active applications are running and the server can be rebooted.