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
Recent Comments