Let me start off this blog post by saying that as much as I want to be a 'developer', I just can't get my mind moving in that direction.  But the beauty with PowerShell is that it can take not even a weekend warrior of development like myself, and actually become useful with SDK's.  

Citrix has done an excellent job in the past few years really developing and providing a very useful policy engine and structure for not only XenApp, but also XenDesktop.  Personally, I have always love the Citrix policy engine, making it very easy to get to the end results I wanted - the look, feel and usefulness of a XenApp environment.  To me, storing the policies within the IMA database always left something to be desired.  Sure, it's always been there, and is a core component of the XenApp infrastructure.  Let's take for example a farm that consists of 20 various policies - printing, Flash management, TimeZone, etc, and consider the following scenarios.

A) You have a separate test farm, and you need to bring over 2 new policies to the production farm - how do you do it?
B) You have purchased a new company who currently runs a XenApp farm, and need to merge their policies into the main farm - how do you do it?
C) You want to migrate all of the XenApp IMA polices into Active Directory, for a single point of policy management - how do you do it?

The simple answer is the XenApp SDK.  The XenApp SDK (http://community.citrix.com/display/xa/XenApp+6.5+Powershell+SDK) allows for complete PowerShell management of a XenApp farm.  This blog post isn't intended as an overview of the full XA SDK, but will focus on the 3 scenarios from above, managing policies with the SDK.  

<h2>
Brief Overview of XenApp SDK
</h2>
The XenApp SDK was released initially with XenApp 5.0, as a replacement for the MFCOM commands that were included with earlier editions of XenApp.  To be honest, MFCOM never seemed super useful with XenApp management, but with XenApp 5 and the usage of PowerShell, I started to see where the SDK was proving to give that little extra bit we were missing.  So how do we use it?  Well, every XenApp server v6.x and above includes PowerShell, so all that needs to be installed is the SDK itself (I wish Citrix would just install this as part of the XenApp install).  There are a ton of resources on the web that provide a greater background on the SDK usage, including some very excellent Farm Reports that will print out the entire farm configuration with best practices - Google is your friend…