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.
Hi SK,
I removed ‘@’ in line 125:
$sessions = (get-brokermachine $server).SessionsEstablished
and also changed line 147 to:
Invoke-Expression “Shutdown.exe /m $dnsname /r /t 0 /c ‘Shutdown scheduled by Citrix farm chained reboot.'”
Afterwards the script functioned as expected.
Great work!!!! Thanke you Dane.
Hi Robert,
i have made as suggested by you, but still its not working. FYI: I am using this script on XenApp 7.6 Farm but no luck
Regards,
Shekhar Reddy.
Hey
Everything appears to be working except for the reboot part
My troubleshooting appears that it’s kicking off the
New-BrokerHostingPowerAction -Action ‘Restart’ -MachineName $server
which the server sits as ‘proccessing’
Is there a way to bypass that method so it will be forced to use the
Invoke-Expression “Shutdown.exe /m $dnsname /r /t 0 /c “”Shutdown scheduled by Citrix farm chained reboot.”””
instead?
For some reason I can not get this to run properly on one of my Xenapp 6.5 farms. I have a second farm that it works as intended. Both scripts are configured identical. I have it running off of the ZDC. I see powershell.exe running but the servers just never reboot. Nothing in the event logs that I have found. Any help is much appreciated!
hello Dane,
i have placed this script on our XenApp 7.6 Farm. in Task scheduler script showing as running however servers are not getting rebooted. could you please let me know is there any permissions required to get the server rebooted or something i need to check
Regards
SK
Download is working now. Thanks!