Skip to content

Instantly share code, notes, and snippets.

@dustindortch
Created October 12, 2017 22:15
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 dustindortch/d89a648e5e7c28fcfa96d38efcf75ff9 to your computer and use it in GitHub Desktop.
Save dustindortch/d89a648e5e7c28fcfa96d38efcf75ff9 to your computer and use it in GitHub Desktop.
Getting Started with Office 365 Groups
$GrpId = (Get-AzureADGroup -SearchString "Group Display Name").ObjectId$Template = Get-AzureADDirectorySettingTemplate | Where-Object {$_.DisplayName -eq 'Group.Unified'}
$Setting = $Template.CreateDirectorySetting()
New-AzureADDirectorySetting -DirectorySetting $Setting
$Setting = Get-AzureADDirectorySetting -Id (Get-AzureADDirectorySetting | Where -Property DisplayName -Value "Group.Unified" -EQ).Id
$Setting['EnableGroupCreation'] = $False
$Setting['GroupCreationAllowedGroupId'] = $GrpId
Set-AzureADDirectorySetting -Id (Get-AzureADDirectorySetting | Where -Property DisplayName -Value "Group.Unified" -EQ).id -DirectorySetting $Setting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment