Documenting a Citrix XenDesktop 4 Farm with Microsoft PowerShell
A customer site I was at recently needed their XenDesktop 4 farm documented. Since I had already created PowerShell scripts to document the various versions of XenApp, I figured a XenDesktop script should be easy to create. This article and the script were written for “SR” at the customer site.
This article will focus only on XenDesktop 4. I am planning on writing articles and scripts for XenDesktop 5.x.
The prerequisites to follow along with this article are:
- A computer, physical or virtual, running Microsoft Windows Server 2003, Server 2008, Server 2008 R2 or Microsoft Windows XP, Vista or 7 for running the XenDesktop Desktop Delivery Controller SDK.
- Citrix XenDesktop 4 Desktop Delivery Controller (DDC) installed with at least one Desktop Group created.
In this article, we will be installing the Citrix Delivery Controller SDK. You can install the SDK from either the XenDesktop 4 installation media or download it from citrix.com. Since I am at a customer site creating this script on a production network, I do not have access to the installation media. Therefore, I will be downloading the SDK.
My initial goal was to see if I could walk down the nodes in the Delivery Services Console (DSC) (Figure 1) and see if I could document every nook and cranny.
Before we can start using PowerShell to document anything in the XenDesktop 4 farm we first need to install the XenDesktop SDK. From either your XenDesktop 4 DDC or another computer, go to http://community.citrix.com/display/xd/Download+SDKS (Figure 2).
Note: For instructions on how to install the SDK from the XenDesktop 4 installation media, please see http://blogs.citrix.com/2010/08/11/xendesktop-4-powershell-sdk-primer-part-1-getting-started/.
Click on Download SDK and Save the file to C:\XD4SDK. You can now close your Internet browser.
Click Start, Run, type in C:\XD4SDK\XenDesktopControllerSDK.msi and press Enter.
Click Run (Figure 3).
Click Next (Figure 4).
Select I accept the terms in the License Agreement and click Next (Figure 5).
Click Next to accept the default installation location (Figure 6).
Click Install (Figure 7).
After a few seconds, the installation completes. Click Finish (Figure 8).
You now have new Start Menu items under All Programs, Citrix. Windows 7 is shown in Figure 9.
Click Start, All Programs, Citrix, Desktop Delivery Controller SDK, Citrix Desktop Delivery Controller SDK Shell. A PowerShell session starts with the Citrix XenDesktop 4 PowerShell modules already loaded.