Export policy configuration in Microsoft Purview

The Export to zip option on the policies page downloads a point-in-time snapshot of all your policy configurations as a ZIP file in XML format. The export captures the full configuration details for every policy in the current solution at the moment of export, including rules, conditions, actions, scoping, and priority settings where relevant. For example, Label policies include the labels in the export, but not rules or conditions as they don't have any. You can't select individual policies for export—the ZIP file always contains all policies.

Important

The exported ZIP file is a read-only, point-in-time snapshot of your policy configuration. It's intended for reference only. You can't import it back into your tenant to restore or create policies, and it doesn't automatically update to reflect subsequent configuration changes.

Note

The Export to CSV option exports only the summary information shown in the policies table, such as policy name, status, and last modified date.

Common scenarios

Common scenarios for using the ZIP export include:

  • Support requests — Attach the ZIP file to a support ticket so that support engineers can review your complete policy configuration without a live troubleshooting session.
  • Configuration backup — Save periodic snapshots of your policy configuration for version control and change tracking purposes.
  • Configuration analysis — Extract the XML file and analyze your policies locally by using PowerShell or by uploading the file to Microsoft 365 Copilot.

Export your policy configuration

  1. Sign in to the Microsoft Purview portal.
  2. Navigate to the policies page for the solution whose policies you want to export. If exporting is supported for that solution, the Export to zip option will be available.
  3. Select Export to zip.
  4. Save the ZIP file when prompted. The file downloads to your default downloads folder.
  5. Extract the ZIP file to access the XML configuration file.

View the exported configuration by using PowerShell

You can use the standard PowerShell Import-Clixml cmdlet to deserialize the exported XML file into PowerShell objects for local analysis. This cmdlet reads the file locally and doesn't connect to any service.

  1. Open a PowerShell window.

  2. Import the XML file into a variable by using the Import-Clixml cmdlet. Replace the path with the location of your extracted XML file.

    $p = Import-Clixml -Path "<path to extracted XML file>"
    
  3. List the available properties in the exported configuration.

    $p | Get-Member -MemberType Properties
    
  4. View the data for a specific property by using Format-Table for a readable summary.

    $p.<PropertyName> | Format-Table
    

    For example, if the export contains DLP policies:

    $p.DlpCompliancePolicies | Format-Table
    $p.DlpComplianceRules | Format-Table
    

Tip

The property names in the exported XML vary by solution. Use $p | Get-Member -MemberType Properties to discover which properties are available in your export.

See also