Get-AppRetentionCompliancePolicy
This cmdlet is available only in Security & Compliance PowerShell. For more information, see Security & Compliance PowerShell.
Use the Get-AppRetentionCompliancePolicy to view app retention compliance policies. App retention & labeling policies target new ways to scope and manage policies.
For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.
Syntax
Get-AppRetentionCompliancePolicy
[[-Identity] <PolicyIdParameter>]
[-DistributionDetail]
[-ErrorPolicyOnly]
[-RetentionRuleTypes]
[<CommonParameters>]
Description
*-AppRetentionCompliance* cmdlets are used for policies with adaptive policy scopes and all static policies that cover Teams private channels, Viva Engage chats, and Viva Engage community messages. Eventually, you'll use these cmdlets for most retention locations and policy types. The *-RetentionCompliance* cmdlets will continue to support Exchange and SharePoint locations primarily. For policies created with the *-AppRetentionCompliance* cmdlets, you can only set the list of included or excluded scopes for all included workloads, which means you'll likely need to create one policy per workload.
To use this cmdlet in Security & Compliance PowerShell, you need to be assigned permissions. For more information, see Permissions in the Microsoft Purview compliance portal.
Examples
Example 1
Get-AppRetentionCompliancePolicy | Format-Table Name,GUID
This example returns a summary list of all app retention compliance policies.
Example 1
Get-AppRetentionCompliancePolicy -Identity "Contoso Viva Engage"
This example returns detailed information for the app retention compliance policy named Contoso Viva Engage.
Parameters
-DistributionDetail
The DistributionDetail switch returns detailed policy distribution information in the DistributionResults property. You don't need to specify a value with this switch.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Security & Compliance |
-ErrorPolicyOnly
{{ Fill ErrorPolicyOnly Description }}
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Security & Compliance |
-Identity
The Identity parameter specifies the app retention compliance policy that you want to view. You can use any value that uniquely identifies the policy. For example:
- Name
- Distinguished name (DN)
- GUID
Type: | PolicyIdParameter |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | Security & Compliance |
-RetentionRuleTypes
The RetentionRuleTypes switch specifies whether to return the value of the RetentionRuleTypes property in the results. You don't need to specify a value with this switch.
To see the RetentionRuleTypes property, you need to pipe the command to a formatting cmdlet. For example, Get-AppRetentionCompliancePolicy -RetentionRuleTypes | Format-Table -Auto Name,RetentionRuleTypes
. If you don't use the RetentionRuleTypes switch, the value appears blank.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Security & Compliance |