Skip to content

Instantly share code, notes, and snippets.

@joerodgers
Created March 8, 2024 19:37
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 joerodgers/71cfb0a1d64ccfd4a722bdeb953fbb32 to your computer and use it in GitHub Desktop.
Save joerodgers/71cfb0a1d64ccfd4a722bdeb953fbb32 to your computer and use it in GitHub Desktop.
#requires -version 7
#requires -modules "Microsoft.Graph.Authentication", "Microsoft.Graph.Beta.Identity.DirectoryManagement"
$params = @{
Values = @(
@{
Name = "EnableMIPLabels"
Value = "True"
}
)
}
Connect-MgGraph -Scopes "Directory.ReadWrite.All" -ErrorAction Stop
$grpUnifiedSetting = Get-MgBetaDirectorySetting -Search DisplayName:"Group.Unified" -ErrorAction Stop | Where-Object -Property DisplayName -eq "Group.Unified"
Update-MgBetaDirectorySetting -DirectorySettingId $grpUnifiedSetting.Id -BodyParameter $params -ErrorAction Stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment