forked from martinagrom/Ignite-PowerShell-Masterclass
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path7-SensitivityLabels.ps1
More file actions
20 lines (14 loc) · 869 Bytes
/
7-SensitivityLabels.ps1
File metadata and controls
20 lines (14 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#---------------------------------------------------------------------------------------
# 7-SensitivityLabels.ps1 - Office 365 Security & Compliance Center PowerShell
# Microsoft Teams and Office 365 Groups PowerShell Masterclass - by @magrom and @atwork
# https://docs.microsoft.com/en-us/powershell/exchange/office-365-scc/connect-to-scc-powershell/connect-to-scc-powershell?view=exchange-ps
#---------------------------------------------------------------------------------------
# Show the labels (with prefix)
Get-CCLabel | ft
Get-CCLabel | fl
# Set a new label policy
# Set-LabelPolicy -Identity <PolicyName> -AdvancedSettings @{Key=ConvertTo-Json("value1", "value2")}
# Set new labels
# $guid = New-Guid
# Set-Label -Identity $guid -AdvancedSettings @{Key=ConvertTo-Json("General", "Internal","Highly Confidential")}
# Remove-PSSession $sessioncompliance