Sensitivity labels: Powershell your way around

Sensitivity labels

Sensitivity labels are part of Microsoft Information Protection solution. They allow you to classify and protect your organization's data, by applying appropriate permissions and restrictions on content.  Sensitivity labels can be applied either by users or automatically.

Prerequisites

Make sure you install Exchange Online module and Connect to Security & Compliance Center PowerShell in your Microsoft 365 tenant.

Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.5
Connect-IPPSSession -UserPrincipalName User@contoso.com

Get-Label

As you have guessed correctly, the cmdlet gets you all your labels.

It can also display a wide range of label's properties

You can view a text version of this image here.

Get detailed label actions

You can also use it to get the details of the label actions


You can view a text version of this image here.


New-Label

This cmdlet creates a new label.

The full list of properties can be found in official documentation.

Set-Label

This cmdlet sets properties of an existing new label. It uses the following parameters:

Image from: https://docs.microsoft.com/en-us/powershell/module/exchange/set-label?view=exchange-ps

Please check the official documentation for an exact description of each parameter.


Remove-Label

Removes the label 

Remove-Label -Identity toRemove

See Also

Why choose MIP built-in labeling over the AIP add-in for Office apps
Audit your sensitivity labels with Powershell