Test-MtPurviewAiRetentionPolicy
SYNOPSIS
Ensure a Microsoft Purview retention policy is configured for Microsoft 365 Copilot interactions.
SYNTAX
Test-MtPurviewAiRetentionPolicy [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Microsoft Purview retention exposes Copilot interaction retention through two surfaces:
the legacy retention surface (Get-RetentionCompliancePolicy, historically used for the
"Teams chats and Copilot interactions" location) and the newer app-retention surface
(Get-AppRetentionCompliancePolicy) used for Microsoft Copilot experiences such as
Microsoft 365 Copilot, Security Copilot, Copilot Studio, and Copilot in Fabric, with
application identifiers such as User:M365Copilot.
Without a retention policy on either surface, organisations cannot satisfy regulatory obligations for AI interaction retention, cannot defensibly dispose of stale Copilot transcripts, and may have gaps in eDiscovery or legal hold workflows.
The test passes if at least one enabled Microsoft Purview retention policy targets Microsoft Copilot interactions on EITHER the legacy retention surface or the app-retention surface.
EXAMPLES
EXAMPLE 1
Test-MtPurviewAiRetentionPolicy
Returns true if a retention policy is configured for the Microsoft Copilot location.
PARAMETERS
-ProgressAction
Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
System.Boolean
NOTES
RELATED LINKS
https://maester.dev/docs/commands/Test-MtPurviewAiRetentionPolicy