Documenting a Citrix XenApp 5 Farm with Microsoft PowerShell
October 3, 2011
A customer site I was at recently needed their XenApp 5 farm documented. I remembered reading about Citrix having some PowerShell “stuff” for XenApp 5 so I started searching. I came across a short article by Michael Bogobowicz Getting a Farm Inventory With XenApp 6 PowerShell Scripting. That short article really piqued my interest. I took Michael’s little script as the starting point to learn Microsoft’s PowerShell. With some help from PowerShell MVP and fellow CTP Brandon Shell and a lot of help from Exchange MVP Michael B. Smith, I turned the original script into over 2000 lines of PowerShell to thoroughly document a XenApp 5 farm.
NOTE: This script is continually updated. You can always find the most current version by going to https://carlwebster.com/where-to-get-copies-of-the-documentation-scripts/
The prerequisites to follow along with this article are:
- A server, physical or virtual, running Microsoft Windows Server 2003 or Windows Server 2008
- Citrix XenApp 5 for Windows Server 2003 or Windows Server 2008 installed
My lab for this article consists of:
- Windows Server 2008 R2 Domain Controller
- Windows Server 2008 R2 SQL Server
- Windows Server 2003 Standard 32-bit with XenApp 5 and HRP7
- Windows Server 2003 Standard 64-bit with XenApp 5 and HRP7
- Windows Server 2008 Standard 32-bit with XenApp 5 and HRP1
- Windows Server 2008 Standard 64-bit with XenApp 5 and HRP1
The two different XenApp 5 versions are in their own XenApp farm.
In this article, we will be installing the Citrix XenApp Commands Technology Preview (v3).
My initial goal was to see if I could walk down the nodes in the Delivery Services Console (Figure 1), or the Access Management Console (Figure 2), and see if I could document every nook and cranny.
Before we can start using PowerShell to document anything in the XenApp 5 farms we first need to install the XenApp Commands Technology Preview (v3). From your XenApp 5 server, go to https://carlwebster.sharefile.com/d-sfef39096d924298b (Figure 3). Note: A MyCitrix.com login is required.
Click on Download and extract the file to C:\XA5CTP. You can now close your Internet browser.
For a 32-bit server, click Start, Run, type in C:\XA5CTP\Citrix.XenApp.Commands\Citrix.XenApp.Commands.Install_x86.msi and press Enter.
For a 64-bit server, click Start, Run, type in C:\XA5CTP\Citrix.XenApp.Commands\Citrix.XenApp.Commands.Install_x64.msi and press Enter.
Click Run (Figure 4).
Select I accept the terms of this license agreement and click Install (Figure 5).
After a few seconds, the installation completes. Click Finish (Figure 6).
You now have new Start Menu items under All Programs, Citrix. Windows Server 2003 is shown in and Windows Server 2008 is shown in.
The menu item that says Windows PowerShell with XenApp Commands (CTP3) will be the one we use for this article. Click Start, All Programs, Citrix, XenApp Commands, Windows PowerShell with XenApp Commands (CTP3). A PowerShell session starts with the Citrix PowerShell modules already loaded.