Topic Last Modified: 2013-02-21
There are several scenarios in which you may want to export or import retention tags, including:
- Applying the same retention policies across all servers in a
multi-forest Exchange organization
- Applying the same retention policies in a hybrid deployment
where some mailboxes reside in your on-premises Exchange
organization and some reside in Exchange Online.
- Applying retention policies in an Exchange Online Archiving
scenario, where users with on-premises Exchange 2010 or later
mailboxes have a cloud-based archive.
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.
Caution: |
---|
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. |
For additional management tasks related to Messaging Records Management, see Messaging Records Management Procedures.
What do you need to know before you begin?
- Estimated time to complete each procedure: 10 minutes
- You need to be assigned permissions before you can perform this
procedure or procedures. To see what permissions you need, see the
"Messaging Records Management" entry in the Messaging Policy and
Compliance Permissions topic.
- You can't select specific retention tags or policies to export
or import. The Export-RetentionTags.ps1 script exports all
retention tags and policies from an organization. The
Import-RetentionTags.ps1 script imports all retention tags and
policies in the XML file being imported, replacing all existing
retention tags and policies in an Exchange organization.
- For information about keyboard shortcuts that may apply to the
procedures in this topic, see Keyboard Shortcuts in
the Exchange Admin Center.
Tip: |
---|
Having problems? Ask for help in the Exchange forums. Visit the forums at: Exchange Server, Exchange Online, or Exchange Online Protection |
What do you want to do?
Export retention tags from an on-premises Exchange organization
- 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"
- Run the Export-RetentionTags.ps1 script to export retention
tags to an 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 to Exchange Online Using Remote PowerShell. Copy Code Export-RetentionTags.ps1 "c:\docs\ExportedRetentionTags.xml"
How do you know this worked?
To verify that you have successfully exported retention tags and retention policies, do the following:
- Navigate to the path you specified in the command to export and
verify that the XML file with the name you specified has been
created.
- Optionally, you can open the XML file in a text editor to
review its contents.
Import retention tags to an Exchange organization
- 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"
- 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 to Exchange Online Using Remote PowerShell. 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"
How do you know this worked?
To verify that you have successfully imported retention tags and retention policies, do the following:
- In the EAC, navigate to Compliance Management >
Retention tags, and verify that the retention tags have been
imported successfully. Navigate to Compliance Management
> Retention policies, and verify that the retention
policies have been imported successfully.
- Use the Get-RetentionPolicy and
Get-RetentionPolicyTag cmdlets to verify that the tags and
policies have been created. For an example about how to retrieve
retention tags and retention policies, see Examples in Get-RetentionPolicyTag
and Get-RetentionPolicy.