Exporting XenApp policys with powershell.

I needed to export our XenApp policies, as both a backup and a reference for an upcoming proof of concept involving XenApp 6. As no migration path is available, having the exported policies in a text document I can keep them open side by side while creating the new policies.

The following assumes your have the Xenapp Cmdlets installed and called.

foreach ($policy in get-xapolicy) {get-xapolicyconfiguration $policy.policyname | out-file “$env:temp$policy.txt”}

if you would prefer xml files:

foreach ($policy in get-xapolicy) {get-xapolicyconfiguration $policy.policyname | export-clixml “$env:temp$policy.xml”}

The above script dumps the policys in the chosen format to your temp folder. To auto jump to temp add “explorer $Env:temp” to the end of the line. E.G:

foreach ($policy in get-xapolicy) {get-xapolicyconfiguration $policy.policyname | export-clixml “$env:temp$policy.xml”} explorer $env:temp

Related Posts

New Module: Creating an RDP file password with Pow... Here's something that is surprisingly tricky to automate in this day and age. Creating a password and storing it in an RDP file. I'm not here to debat...
Dealing with multi numbered versions in powershell... So here's a quick little blog about something i discovered in powershell while googling today. Lots of vendors like to use version numbers includin...
New Free Tool: Citrix Director Notification Servic... Citrix Director for XenApp and XenDesktop can be a great utility for information about your Application / Desktop virtualisation environment. In Direc...

Leave a Reply