Automating Citrix XenDesktop 7.1 deployment

This blog will show you how to automate a Citrix XenDesktop 7.1 App edition server with #RES Automation Manager. The tool to automate the deployment with isn’t that important, it could be any tool, I chose RES Automation Manager for it’s one of the simplest deployment tools I know and it simply works.

A little background

I’ve set up a virtual machine running on a VMware vSphere environment and installed a management server from which RES Automation Manager is running. This server is also the dispatcher needed to deploy the tasks scheduled with RES AM.
I created a share on the management server where I extracted the XenDesktop ISO and many other files needed in my project. In the project I will copy the files from the share to a local folder and run them from there. At the end of the project I will clean up these files from the server that I have been installing.

RES Automation Manager setup

This is not that much of a RES setup but more of a setup of the module to install the XenDesktop 7.1 server.
I’ve created a few modules to install several roles or servers, I’ve split the installation of the different components to make my life easier. In the future I will perhaps combine these tasks but for now this works.

When we deep dive into the module you notice that there are several task, I will talk you through the very basics, not the details.

To install XenDesktop 7.1 XenApp a few requirements have to be met, before we install XenDesktop 7.1 server we make sure all these are met.

After the installation of some roles we reboot the server so that the roles can be installed completely. We do this two times. Through a twitter conversation with @_POPPELGAARD I learned that the remote assistance and desktop experience rol are installed with the VDA so we don’t need to install them like I do. Perhaps I’ll change the deployment but this one works and I always learned never to change a winning team.

After the remote assistance and desktop experience installation Windows does a double reboot, I still have to built something to catch that second boot. I added a postpone job for now for 5 minutes to make sure all reboots are completed. If I didn’t add this my job would crash for Windows would be just to far up for the agent to come online and think it could go along with the task. Sometimes we do thing the hard way sometimes the easy, I chose the easy route here.. 5 minutes delay.

I copy all the files from the shared source to a local installation directory.
Then I install all the vCredist prerequisites needed by XenDesktop, these are installed automatically also but I was trying to control the time the installation was taking. By processing them at this moment it saves me time later on.

The main part of the module is the task to install the Xendesktop 7.1 XenApp server. A part of the command is shown below. Don’t add the NoReboot option in for the installation will fail if you do. The installation will need to reboot at least once.

After this command I added a postpone of 15 minutes and I hear you thinking 15 minutes that’s a life time.
I noticed and anyone installing Xendesktop 7.1 XenApp server (calling it XenApp for obvious reasons) will have noticed also that the installation calls many MSI’s, it’s pretty hard to determine what is happening at which time. I tried without a postpone but RES told me the installation is finished while actually in the backend XenDesktop was calling MSI after MSI only finishing the first initial MSI.

The screenshots below give you an impression on what XenDesktop is doing while installing, sometimes something pops-up but for a very long time you are watching a solid color screen.
It just takes some time, let it run.

Adding a bit of coffee time you ensure that the installation will succeed.
After a while, about 25-30 minutes the installation is done.

Can it be done faster when done by hand, sure it can but what is your point?
The reason you want to automate these deployments is that you want to make sure that every deployment of these servers is 100% the same so that you can rebuild your site from scratch.


the whole module is set up with parameters, I’ve used only a few parameters. These parameters will be used on a higher level to send the same input to several modules.
There is a different way of doing this, there are global variables that can be set, I’m gonna move the credentials there for we use one account for installation tasks.


The module is part of a project, this project is not that hard for it only includes one module. The reason that we made different projects for now is that we want to test the different modules one by one. After we are satisfied with how the modules are running, when they are running perfectly we will combine them in one project.

When the project is running you can see the results and follow what is happening. In the screenshot below all the jobs did finish already so all is at 100%.


I hope you have gotten a good picture of the deployment of XenDesktop 7.1 with any automated tool and what to watch out for. Make sure you take care of the timing, Citrix installation take time and can’t be rushed.
..and please let the server reboot when it needs to, it’s better to wait a few minutes and get that extra bit of coffee then have a server in a dodgy state.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.