Hello Phemanth,
I did the following and it worked for me
- connect to PowerShell ISE as admin
- Install-Module Microsoft.Graph -Scope CurrentUser
- Install-Module Microsoft.Graph.Beta -Scope CurrentUser
- Connect-MgGraph -Scopes “Directory.ReadWrite.All”
- Connect-AzureAD
- Get-MgBetaDirectorySettingTemplate
- $TemplateId = (Get-MgBetaDirectorySettingTemplate | where { $_.DisplayName -eq "Group.Unified" }).Id
- $Template = Get-MgBetaDirectorySettingTemplate | where -Property Id -Value $TemplateId -EQ
- $params = @{ templateId = "$TemplateId" values = @(
)@{ name = "UsageGuidelinesUrl" value = "https://guideline.example.com" } @{ name = "EnableMIPLabels" value = "True" }
}
- New-MgBetaDirectorySetting -BodyParameter $params
- $Setting = Get-MgBetaDirectorySetting | where { $_.DisplayName -eq "Group.Unified"}
$Setting.Values