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.