Quickly Updating Persistent MCS VDAs

By David Ott posted 01-22-2019 12:47 PM

  

I have to maintain the VDA software on roughly 100 persistent MCS desktops. Every time Citrix came out with a new version of Virtual Apps and Desktops (XenApp/XenDesktop), I would cringe at the thought of having to "touch" every one of them. It usually took me two or more weeks to get through them all.  I finally got tired of that process and decided to script it. It has saved me a ton of time (and from pulling out all of my hair), and I hope it can help others as well.

The really short version of how it works:

  1. Gets a list of computers from the DDC (or you can manually input the computer names into the script).
  2. On each computer it will create two scripts, and two scheduled tasks.
    1. The first script loads auto logon information into the registry (local administrator account)
      1. Executed one time to restart the machine
    2. The second script handles the VDA removal and install of the new version.
      1. Executes when the local administrator logs on

At the end, it removes the scheduled tasks, the PowerShell scripts copied to the VDA, and auto logon information.

Here is the script - read through all the comments, so you know how to edit it for your environment.

I also created a video from an older version of the script if you want to get a better idea of how it works. It was designed to work with Citrix Hypervisor (XenServer), but the new one uses a mapped drive instead.


#XenServer
#VDA
#Citrix
#Virtual_Apps_Desktops
#XenApp
#XenDesktop
#MCS