Skip to main content
Version: 2.1.0

Test-MtPurviewAiSensitivityLabelsForFiles

SYNOPSIS

Ensure Microsoft Purview sensitivity labels are published so Microsoft 365 Copilot and DSPM for AI honor and inherit them on AI-generated content.

SYNTAX

Test-MtPurviewAiSensitivityLabelsForFiles [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Checks that at least one sensitivity label policy is published, and that at least one published label is scoped to files (the scope that governs SharePoint, OneDrive and Office files used by Microsoft 365 Copilot).

Microsoft 365 Copilot only respects sensitivity labels and inherits the most restrictive label onto generated content if labels are actually published to users. When no label is published or no published label targets files, Copilot has no labelling signal to apply and DSPM for AI cannot report on label-based oversharing.

The test passes if at least one label policy is published AND at least one file-scoped label is included in a published label policy.

EXAMPLES

EXAMPLE 1

Test-MtPurviewAiSensitivityLabelsForFiles

Returns true if a sensitivity label scoped to files is published in the tenant.

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

https://maester.dev/docs/commands/Test-MtPurviewAiSensitivityLabelsForFiles