Skip to content

Instantly share code, notes, and snippets.

@BobGerman
Created September 22, 2017 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BobGerman/e0727f7de64039129e624be5a7c37a3e to your computer and use it in GitHub Desktop.
Save BobGerman/e0727f7de64039129e624be5a7c37a3e to your computer and use it in GitHub Desktop.
Sample PowerShell to set up SP Online site classifications
$me = Get-Credential
Import-Module AzureADPreview
Connect-AzureAD -Credential $me
# Create the new setting
$template = Get-AzureADDirectorySettingTemplate | Where-Object {$_.DisplayName -eq "Group.Unified"}
$setting = $template.CreateDirectorySetting()
$setting["UsageGuidelinesUrl"] = "http://www.microsoft.com/"
$setting["ClassificationList"] = "Secret, Confidential, Internal, Public"
$setting["DefaultClassification"] = "Confidential"
New-AzureADDirectorySetting -DirectorySetting $setting
# View settings to check for success
Get-AzureADDirectorySetting -All $true | % {$_.values}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment