Product Documentation

Import XenDesktop 4 data

Feb 25, 2013

The import tool, XdImport, reads settings from XenDesktop 4 that are contained in the XML file produced by the export tool, XdExport, and applies those settings to an existing XenDesktop 7.x Site. The Import tool is the PowerShell script Import-XdSettings.ps1.

Not all the data is imported from the XdSettings.xml file; for details of which types of data are imported, see Data import and export details.

To apply only a subset of the exported data, edit the XML file before running the Import tool. For example, you might want to remove desktop groups and policies that are not needed in your XenDesktop 7.x deployment.

The import tool runs successfully if you leave entire elements empty. For example, you can delete all the desktop groups without causing any issues. The tool always validates the XML file before attempting to import any data. For further details of how to edit the XML file, see Edit the Migration Tool XML file.

Data import and export details describes how the data in the XML file migrates to the XenDesktop 7.x Site.

Run XdImport on any machine on which all the XenDesktop 7.x SDKs are installed. You must have the full XenDesktop Administrator identity to run the tool.

Before you import, make sure that you have set up a XenDesktop 7.x Site, including its database. For full details of database requirements, see the Database section in System requirements for XenDesktop 7.1.

Citrix recommends that you complete the import to XenDesktop 7.x before any user testing or general Site configuration occurs. Merge configurations only when the Site is not in use.

To import XenDesktop 4 data

  1. Create a XenDesktop 7.x site.
  2. Download and extract the files to the machine on which you plan to run the tool.
  3. In a PowerShell session, run Import-XdSettings.ps1. You can specify the following parameters:
    Parameter Description


    This parameter is required.

    A PowerShell hash table that maps Hypervisor addresses to PSCredential instances as required for the creation of Hypervisor connections.

    Default = @{}

    Enter credentials for the Hypervisor to which the XenDesktop 4 farm connects.

    For a single Hypervisor, create the argument as follows:

    $credential = Get-Credential 
    $mappings = @{"http://<HypervisorIP>" 
    -FilePath. \XdSettings.xml 
    -HypervisorConnectionCredentials $mappings

    Note that the address specified in the hash table must exactly match the address in the XML file.

    For example, with both a XenServer and a VMware Hypervisor, create the following argument:

    $Xencredential = Get-Credential  
    $VMWcredential = Get-Credential 
    $mappings = @{"http://<XenHypervisorIP>" 
    = $Xencredential;"http://<VmWHypervisorIP>/SDK" 
    = $VMWcredential} 
    -FilePath. \XdSettings.xml 
    -HypervisorConnectionCredentials $mappings

    -FilePath <path>

    The location of the XML file from which the farm data is to be imported.

    The value for <path> is required.


    The name of a controller in the XenDesktop 7.x Site.

    Default = localhost


    Adds desktops defined in the XML file to Delivery Groups in the XenDesktop 7.x Site that have the same name as the groups described in the XML file. The associated machines and users are also added.

    If this parameter is not supplied, no content is added to existing desktop groups in the XenDesktop 7.x Site.


    The script does not create a machine policy that contains site-level settings.

    If you do not supply this parameter and the machine policy for the site exists, the script fails.


    Completes a trial run to determine what would be changed in or added to the XenDesktop 7.x Site. Including this parameter sends the information to the log file, but does not change the Site.

    -LogFilePath <path>

    Indicates the full path of the log file. The log file contains text describing all writes performed against the XenDesktop 7.x Site.

    Default = .\Import-XdSettings.log

    -? or -help

    Displays information about the parameters and exits without importing any data.

    If the XML file contains policy data, either all polices are imported successfully or, if there is any failure, no policy data is imported. Importing large numbers of policies with many settings can take several hours.
  4. When the script completes, the message Done appears.

After successfully importing the data from the XML file, you can either run further export and import iterations, or, if you have imported all the relevant data, complete the post-migration tasks described in Post-migration tasks.