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. CameronCameron04-16-2014

    Hi Dane,

    First off, thanks for the continued work on this tool! I have a small XenApp 6.5 farm with three servers (two production and one test box). The script (rev7) is setup to run from the zone data collector. In the event log I see it starting and beginning to process the other two servers in worker group “AllServers”. Logons end up disabled on all three servers but no reboots happen.

    I checked for sessions and all I saw was a disconnected Services session ID and the listener.

    The script is set to run with a service ID set as local admin on each of the servers.

    Here are the variables as I have them defined:

    [int]$Global:REBOOTINTERVAL = “15”
    [int]$Global:FARMLOOPINTERVAL = “2”
    $Global:REBOOTTHISSERVER = $true
    $Global:EXCLUDESERVERS = “”
    $Global:WORKERGROUPS = “”
    [int]$Global:MAXSERVERS = “1”
    $Global:ENABLESMTP = $true

    I’d love to get this working reliably so let me know if you need any more details.

    -Cameron

  2. StanStan03-29-2014

    please let me download script

  3. john petraliajohn petralia03-28-2014

    The sharefile link to the script is not working for me.

  4. Philipp MairPhilipp Mair02-25-2014

    Hi,

    great script, thank you!
    Some of our XenApp 6.5 farms have got problems with ghost sessions. Same issue as described here: http://discussions.citrix.com/topic/269840-sessions-remain-in-console-window-after-log-off/
    Only workaround is to restart IMA service.

    Your script treats these ghost sessions as active sessions and so servers won’t reboot:
    $sessions = @(get-xasession | Where {$_.ServerName -eq $server} | Where {$_.State -ne “Listening”} | Where {$_.State -ne “Disconnected”} | Where {$_.SessionName -ne “Console”})

    It would be nice if there was a possibility to restart IMA service within your script.
    What do you think about that? Is this possible or should we restart IMA service with a separate scheduled task?

    Regards

  5. Randy BrewerRandy Brewer02-18-2014

    If the FarmLoopInterval has passed and not all the servers in the farm have been processed (Session remain on the servers beyond the interval), does the script bypass the remaining unprocessed servers and start again with the first server?

1 12 13 14 15 16 25

Leave a Reply