Export-PurviewConfig
This cmdlet is available only in Security & Compliance PowerShell. For more information, see Security & Compliance PowerShell.
Use the Export-PurviewConfig cmdlet to export Microsoft Purview diagnostic configuration data for your organization. The exported data is returned as a compressed ZIP file (byte array) containing component-specific diagnostic information.
For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.
Syntax
Default (Default)
Export-PurviewConfig
-Components <MultiValuedProperty>
[-Confirm]
[[-DomainController] <Fqdn>]
[-PolicyName <<String>]]>]
[-UserPrincipalName <<SmtpAddress>]]>]
[-WhatIf]
[<CommonParameters>]
Description
This cmdlet exports Purview diagnostic data for specified components in your organization. The data is returned as a ZIP archive (binary-encoded byte array) for each component. Each file contains the diagnostic configuration data for the component in a structured format.
The exported data is useful for troubleshooting and diagnostics of Purview configuration issues across DLP, MIP Labels, Classification, and Data Lifecycle Management.
You need to be assigned permissions in the Security & Compliance before you can use this cmdlet. For more information, see Permissions in the Microsoft Purview compliance portal.
Examples
Example 1
Export-PurviewConfig -Components DLP
This example exports diagnostic configuration data for the DLP component.
Example 2
$result = Export-PurviewConfig -Components DLP,MIPLabels
[IO.File]::WriteAllBytes("C:\DiagnosticExport.zip", $result)
This example exports diagnostic data for the DLP and MIPLabels components and saves the resulting ZIP file to disk.
Parameters
-Components
Applicable: Security & Compliance
The Components parameter specifies which Purview components to export diagnostic data for. Valid values are:
- ClassificationAndTextExtraction
- DLM
- DLP
- MIPLabels
You can specify multiple values separated by commas.
Note: If you specify an unsupported component value, a warning is logged and the component is skipped.
Parameter properties
| Type: | MultiValuedProperty |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Confirm
Applicable: Security & Compliance
The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.
- Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax:
-Confirm:$false. - Most other cmdlets (for example, New-* and Set-* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-DomainController
Applicable: Security & Compliance
This parameter is reserved for internal Microsoft use.
Parameter properties
| Type: | Fqdn |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | 1 |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-PolicyName
Applicable: Security & Compliance
The PolicyName parameter specifies the name of the policy to scope the export to.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | 2 |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-UserPrincipalName
Applicable: Security & Compliance
The UserPrincipalName parameter specifies the user principal name (UPN) of the user to scope the export to.
Parameter properties
| Type: | SmtpAddress |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | 3 |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-WhatIf
Applicable: Security & Compliance
The WhatIf switch doesn't work in Security & Compliance PowerShell.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.