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
- Dino_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
}
- Vee_MaxBrass ContributorDino_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
} - Hello, what about:
get-sposite | ft Url, SensitivityLabel- Dino_VoCopper ContributorUnfortunately, doesn't work.
- What if you query a specific site? Some properties might not be shown if you get all sites.