XenApp 5 Automated Install Scripts

Here’s a blast from the past! XenApp 5 for 2003!

As part of the project I’m currently working on, there is a need to have a XenApp 5 farm for legacy apps. Damn those legacy apps, holding onto the past like a 1950’s revival weekend (but without the tea and dancing). It is one of those necessities in life I’m afraid but it’s no bother is it? I mean, it’s only XenApp 5. How hard is that to install and configure four ZDCs and a gold image for PVS.

Wait a minute! It’s not as easy as XenApp 6/6.5 with command-line parameters and an easy-peasy GUI to shoot though…

D’oh!

Wait a minute! With a slightly dangerous knowledge of Powershell and plenty of enthusiasm, perhaps we can automate the build to make it quicker, slicker and very importantly, consistent!

Well folks, that is what I did and to my surprise, it worked! I have included the scripts I used to build a XenApp server to full XenApp 5 FR3 level, with the last hotfixes installed. As a Powershell and scripting newbee, I don’t have the skills to cobble them all together and as time was against me, I thought it best just to script everything required and then run the scripts manually. You will need to download all the required media yourselves J

Each script, once run, is fully automated and reboots the server once those tasks are complete so you’ll know when it’s time to run the next script. It wouldn’t be beyond the realms of possibility to fully automate the process with something like Microsoft SCCM or RES Automation Manager if you use these in your environments. I know for a fact it would be very simple to do with RES. Just be aware that apart from the prerequisite media needed, there are some answer files that will need creating too. The XenApp install answer file is super easy though as it has everything in a preconfigured one already and all you have to do is fill in the specific parts and un-hash the relevant lines of code. It is found here – <XenApp media root>SupportInstall UnattendedTemplate.txt.

Anyway, the scripts are broken down into the following areas:

1. Prereqs – XenApp 5 prerequisites

2. XenApp 5 – XenApp 5 base install

3. Consoles – installs the Delivery Services Console, the Advanced Management console and runs the fix required if you install the DSC AFTER installing .NET 4 (which I had). See here for details – The good thing about having the consoles as a separate install is that for my PVS image, I didn’t want the consoles installed as it would not be a XenApp management point so just skipped this step.

4. Post Install – installs all the updates required to make XenApp 5 FR2.

5. HRP 7 – installs the latest Hotfix Rollup Pack, HRP7.

6. Hotfixes – installs all required post-HRP7.

7. FR3 – installs the HDX Flash hotfix to make XenApp FR3.

My basic script is here for your use and abuse and no doubt improve! You can either edit various bits you need to fit it around your install/organisation or make sure that you place the prereqs, XenApp 5 install media, hotfixes etc. in the correct folders so that the scripts work. These were just names I used so feel free to change it for your own use! I’ve annotated the script quite a bit so although basic, it’s easy to read and make the amendments you require.

No doubt some of you scripters out there will laugh when you see some of my newbee ways/mistakes and be able to make it much slicker. For example, I know that for the Terminal Services install, it requires you to have the sysoc.txt answer file. Someone with better scripting knowledge would be able to generate the file as part of the script and put it in the correct place, hence eliminating the need to have preconfigured this. This is also no doubt true of the XenApp 5 unattended install text file too.

I have to mention at this stage that you are using this at your own peril and I cannot take any responsibility for the script not working in your environment but to quote one of my betters “what’s the worst that can happen?” J Always test first!

Hope this helps someone and saves time on your next Back to The Future install of XenApp 5! J

Oh, and if you’re wondering why I’ve got two versions of Java, the 1.5.09 version is a prerequisite of the XenApp Advanced Configuration console!

And that’s it! Perhaps not the prettiest script but it does work and speeds up deployments a lot, especially if you have to build a bunch of servers rather than just one PVS image, as was the case for me.

As the script code itself was too big to put into the blog, I’ve put it into a word doc and attached. Each of my separate scripts is listed as a different section – all very obvious!

Cheers! J

XenApp5Script.docx

Advertisements