How to Export and Import XenDesktop Policies Using PowerShell SDK

How to Export and Import XenDesktop Policies Using PowerShell SDK

book

Article ID: CTX136646

calendar_today

Updated On:

Description

This article describes how to export and import the XenDesktop 5 policies for backup and disaster recovery purposes.

Background

The Desktop Studio does not provide any way to export or import a policy that has been configured. However, export or import can be done through PowerShell on a XenDesktop 5 Desktop Delivery Controller.

Note: Export or import will not work if you try to import the exported policy on a different site. The policy contains some very site-specific information and export or import works only in the same site.


Instructions

Exporting the Policy

Complete the following procedure to export the policy:

  1. Log on to the Desktop Delivery Controller with a XenDesktop Administrator role account.

  2. Open PowerShell and type the command: “Add-PSSnapin Citrix*”

  3. Now type “Export-BrokerDesktopPolicy | Out-File -FilePath <Filename.Txt>

    Note: <Filename.Txt> is a placeholder for the destination file which you want to contain the policy export.

The preceding commands exports the policy to a binary file.

Importing the Policy

Complete the following procedure to import the policy:

  1. Log on to the Desktop Delivery Controller with a XenDesktop Administrator role account.

  2. Open PowerShell and type the command: “Add-PSSnapin Citrix*”

  3. Now Type “Import-BrokerDesktopPolicy (Get-Content <location of the exported filename.txt>)

    The preceding steps imports all the policies back to the Desktop studio.

    Note: There is no way to export the policies individually and the preceding steps works only for policies created within Desktop studio, and not in Active Directory. It is not advised to import the policy, which has been exported from a different site.

Issue/Introduction

This article describes how to export and import the XenDesktop 5 policies for backup and disaster recovery purposes.