Citrix has chosen PowerShell as their scripting and development platform for XenApp. This has lead to the creation...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
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.
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.
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).
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:
- Load the snap-in on demand: Add-PSSnapin Citrix.XenApp.Commands
- 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.
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).
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.
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.