Skip to content

Commit 2e3ed7c

Browse files
committed
✨feat: add script for configuring sensitivity labels and group settings in Microsoft 365
1 parent d771334 commit 2e3ed7c

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# https://learn.microsoft.com/en-us/entra/identity/users/groups-assign-sensitivity-labels?tabs=microsoft
2+
3+
$grpUnifiedSetting = Get-MgBetaDirectorySetting | Where-Object { $_.Values.Name -eq 'EnableMIPLabels' }
4+
$grpUnifiedSetting.Values
5+
6+
$params = @{
7+
Values = @(
8+
@{
9+
Name = 'EnableMIPLabels'
10+
Value = 'True'
11+
},
12+
@{
13+
Name = 'EnableGroupCreation'
14+
Value = 'False'
15+
}
16+
)
17+
}
18+
19+
Update-MgBetaDirectorySetting -DirectorySettingId $grpUnifiedSetting.Id -BodyParameter $params
20+
21+
$Setting = Get-MgBetaDirectorySetting -DirectorySettingId $grpUnifiedSetting.Id
22+
$Setting.Values
23+
24+
# https://learn.microsoft.com/en-us/purview/create-sensitivity-labels?tabs=classic-label-scheme#create-and-configure-sensitivity-labels
25+
26+
Connect-IPPSSession -ShowBanner:$false -BypassMailboxAnchoring -UserPrincipalName $MyUPN
27+
Execute-AzureAdLabelSync
28+
29+
30+
31+
# https://learn.microsoft.com/en-us/purview/sensitivity-labels-sharepoint-onedrive-files
32+
Import-Module -Name Microsoft.Online.SharePoint.PowerShell
33+
Set-SPOTenant -EnableAIPIntegration $true
34+
Set-SPOTenant -EnableSensitivityLabelforPDF $true

0 commit comments

Comments
 (0)