Applies to: Exchange Server 2010 SP3

Topic Last Modified: 2012-03-08

There are several scenarios in which you may want to export or import retention tags, including:

In these scenarios, the Managed Folder Assistant can correctly process an item that has a retention tag applied after the item or the mailbox is moved to another organization.

Note:
To keep retention tags and retention policies synchronized between two organizations, every time you make changes to a retention tag or policy in the source organization, you must perform this procedure to export retention tags and policies from the source organization and import them in the destination organization.

You can’t select specific retention tags or policies to export. The Export-RetentionTags.ps1 script exports all retention tags and policies from an organization.

Looking for other management tasks related to messaging records management (MRM)? Check out Deploying Messaging Records Management.

Export retention tags from an on-premises Exchange organization

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Messaging records management" entry in the Messaging Policy and Compliance Permissions topic.

  1. Run this Exchange Management Shell command to change directory to the Scripts subdirectory in your Exchange installation path.

    Copy Code
    Cd "<Exchange Server installation path>\Scripts"
    
  2. Important:
    If you’re importing or exporting retention tags and retention policies to Exchange Online, you must connect your Windows PowerShell session to Exchange Online. For details, see Connect Windows PowerShell to the Service.
    Run the Export-RetentionTags.ps1 script to export retention tags to an .xml file.

    Copy Code
    Export-RetentionTags.ps1 "c:\docs\ExportedRetentionTags.xml"
    

Import retention tags to an Exchange organization

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Messaging records management" entry in the Messaging Policy and Compliance Permissions topic.

  1. Run this Shell command to change the directory to the Scripts subdirectory in your Exchange installation path.

    Copy Code
    Cd "<Exchange Server installation path>\Scripts"
    
  2. Run the Import-RetentionTags.ps1 script to import retention tags from a previously exported .xml file.

    Important:
    If you’re importing or exporting retention tags and retention policies to Exchange Online, you must connect your Windows PowerShell session to Exchange Online. For details, see Connect Windows PowerShell to the Service.
    Note:
    When running this script against Exchange Online, you may be prompted to confirm that you want to run software from an untrusted publisher. Verify that the name of the publisher appears as CN=Microsoft Corporation, OU=MOPR, O=Microsoft Corporation, L=Redmond, S=Washington, C=US, and then click R to allow the script to be run once or A to always run.
    Copy Code
    Import-RetentionTags.ps1 "c:\docs\ExportedRetentionTags.xml"
    
  3. If the destination organization contains any retention tags or retention policies that aren’t found in the .xml file you’re importing, you’ll be prompted whether you want to delete them. If true synchronization of retention tags and retention policies between the source and destination organizations is desired, select the option to delete them. This makes sure both organizations contain the same retention tags and retention policies.

    Warning:
    If you delete a retention policy in the destination organization that’s applied to mailbox users, you may receive additional prompts before deleting the policy. If you delete a retention policy that’s applied to mailbox users, those users will no longer have a retention policy applied. Depending on your organization’s compliance requirements, you should apply another retention policy to these users to avoid the risk of being out of compliance.

Other Tasks

After you export and import retention tags, you may also want to: