Forum Discussion
Dino_Vo
Dec 14, 2021Copper Contributor
SharePoint + Powershell + sensitivity labels
Hi, is there anyway to find out which sensitivity labels are applied to specific SharePoint site (using Powershell)? Kr, Dino
- Jan 10, 2023Dino_Vo - You can use the following to get a list of Sensitivity Labels:
Get-Label |Select Name, Guid
Then use the following to get a list of SharePoint sites with Sensitivity Labels applied:
$Sites = Get-SPOSite
Foreach ($Site in $Sites)
{
Get-SPOSite -Identity $Site.Url | Select Url, SensitivityLabel
}
Dec 16, 2021
yes Christian, it is a known limitation specially with -Filter and -Limit parameters. Thanks!
Dec 16, 2021
Considering the amount of properties that may have default value we better link to https://docs.microsoft.com/en-us/powershell/module/sharepoint-online/get-sposite?view=sharepoint-ps as well (note section).