Test-MtPurviewAiDlpPolicy
SYNOPSIS
Ensure a Microsoft Purview DLP policy is configured for the Microsoft 365 Copilot location.
SYNTAX
Test-MtPurviewAiDlpPolicy [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Microsoft Purview Data Loss Prevention exposes a Microsoft 365 Copilot location that lets administrators block Copilot from summarising or surfacing files containing sensitive information types (SITs) or labelled content.
Without a DLP policy targeting the Copilot location, Microsoft 365 Copilot can summarise, paraphrase or expose sensitive content (PII, secrets, financial data, regulated data) from any file the requesting user can already access - accelerating oversharing risk for AI-assisted workflows.
The test passes if at least one enabled, non-simulation DLP policy targets the Microsoft 365 Copilot location.
Detection is resilient to schema variation: it inspects MicrosoftCopilotLocation, Workload, Locations,
and EnforcementPlanes (which can surface Copilot scope as values such as CopilotExperiences) so that
policies created through both the older preview surface and the current Microsoft Purview portal /
PowerShell paths are recognised.
EXAMPLES
EXAMPLE 1
Test-MtPurviewAiDlpPolicy
Returns true if a DLP policy is configured for the Microsoft 365 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.