XenApp cmdlets for Windows Powershell

Follow these steps for installing and configuring XenApp cmdlets and learn the many ways these scripts can simplify day-to-day administrative tasks.

Citrix has chosen PowerShell as their scripting and development platform for XenApp. This has lead to the creation of the XenApp cmdlets; providing the administrator with a wealth of power. Follow these steps for installing and configuring cmdlets and learn the many ways these scripts can be utilized to simplify day-to-day administrative tasks.

Download
To set up PowerShell automation in three easy steps, follow the Step-by-Step Guide: PowerShell automation for Windows Server 2008. You should also be aware that XenApp cmdlets require XenApp 4.5 with Hotfix Rollup Pack 3 (HRP3) and above. This is primarily due to the fact that the .NET classes the cmdlets were built on are not available prior to HRP03.

XenApp cmdlets must also be installed on a XenApp server. Citrix made a conscience decision to rely on PowerShell remoting. This was primarily a performance and quality control decision.

The XenApp cmdlets are still in CTP so you will need to have a MyCitrix account. This account is free and you can sign up while following the download link.

Install
After you download MSI the install is as simple as a double click. This will start the installer. Step through the wizard and it will register the snap-in, as well as create the shortcut (figure 1).

Shortcut
Figure 1 Creating a shortcut. (Click on image for enlarged view.)

Configure
By default, the snap-in is installed but the registered PowerShell does not load it. Therefore, you will need to take an extra step to make this happen. You have two options:

  1. Load the snap-in on demand: Add-PSSnapin Citrix.XenApp.Commands
  2. Add the above command to your profile.ps1 file so it is loaded every time.

Utilizing XenApp cmdlets

Getting the farm
Getting the farm information is done with two different cmdlets. The first cmdlet is Get-XAFarm (figure 2) and is used for getting the farm object which provides general information about the farm .The second cmdlet is Get-XAFarmConfiguration (figure 3) which is used to get the farm configuration information.

Get-XAFarm
Figure 2 Get-XAFarm. (Click on image for enlarged view.)

Get-XAFarmConfiguration
Figure 3 Get-XAFarmConfiguration. (Click on image for enlarged view.)

Getting applications
To get application information, use Get-XAApplication (figure 4). To list the application configuration information, including users and groups, use the cmdlet Get-XAApplicationReport (figure 5).

 Get-XAApplication
Figure 4 Get-XAApplication. (Click on image for enlarged view.)

Get-XAApplicationReport
Figure 5 Get-XAApplicationReport. (Click on image for enlarged view.)

Getting XenApp server information
There are two cmdlets for getting server information. Get-XAServer (figure 6) is used for getting basic information about the server. Get-XAServerConfiguration (figure 7) gives detailed information about the XenApp Server.

 Get-XAServer
Figure 6 Get-XAServer. (Click on image for enlarged view.)

 Get-XAServerConfiguration
Figure 7 Get-XAServerConfiguration. (Click on image for enlarged view.)

Now that the XenApp cmdlets are downloaded, installed and configured you are ready to get started using these cmdlets to manage your farm and make your day-to-day adminstrative life easier.

ABOUT THE AUTHOR:
Brandon Shell has been in the IT industry since 1994. He started out as a PC tech and general fix-it guy for numerous companies. In 2000, he joined Microsoft as contractor for the Directory Services team (the first of several times) until he became a full-time employee in 2002. In 2004, he left Microsoft to pursue a new position focusing on his real passion, PowerShell. In 2007 he joined the PowerShell MVP ranks and spent the last several years building his PowerShell knowledge and helping others build theirs.

This was first published in August 2009

Dig deeper on Application virtualization and streaming

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

This Content Component encountered an error
Close