Forum Discussion
Enable Office 365 Group creation for All Users
To revert the changed settings, you will have to either remove the entire Settings Object or change the Group. The first one is done via:
Get-MsolAllSettings | ? {$_.TemplateId -eq "62375ab9-6b52-47ed-826b-58e47e0e304b"} | % { Remove-MsolSettings -SettingId $_.ObjectId }
however, it will affect any other changes you have made to the Groups settings object, for example Guest access.
To simply update the settings object to allow Group creation and preserve all other settings:
$temp = Get-MsolAllSettings | ? {$_.TemplateId -eq "62375ab9-6b52-47ed-826b-58e47e0e304b"}
$temp["EnableGroupCreation"] = $True
Set-MsolSettings -SettingId $temp.ObjectId -SettingsValue $temp.GetSettingsValue()
The cmdlets above are generic, the objectId should apply to all tenants.
Hi Vasil,
I am using AzureADPreview 2.0
Not sure what commands to substitute for the last line or if this is written differently.
I do want to keep the existing settings but open it up to everyone again.
If I substitute the commands that you wrote with the below, the first two lines work.
I'm stuck on what the third line should be or if it should be written differently.
$temp = Get-AzureADDirectorySetting | ? {$_.TemplateId -eq "62375ab9-6b52-47ed-826b-58e47e0e304b"}
$temp["EnableGroupCreation"] = $True
I thought it would be: New-AzureADSetting...
but with the $temp commands I'm missing a $setting variable or something else.
I found some help from the below link, but what I have tried is not working.
http://drewmadelung.com/managing-office-365-group-using-azure-ad-powershell-v2/
Thanks,
Denise
- VasilMichevApr 21, 2017MVP
If using AzureAD cmdlets, you need Set-AzureADDirectorySetting for the last part. There's a detailed guide here: https://docs.microsoft.com/en-us/azure/active-directory/active-directory-accessmanagement-groups-settings-cmdlets
- Denise ChildApr 21, 2017Iron Contributor
These commands appear to work but do not do anything.
EnableGroupCreation Value still shows False
#Check for settings
Get-AzureADDirectorySetting -All $True | Format-Table Id, DisplayName
Get-AzureADDirectorySetting -All $True | where-object {$_.DisplayName -eq "Group.Unified"} | ForEach-Object Values#Enable again and preserve the current settings
$temp = Get-AzureADDirectorySetting | ? {$_.TemplateId -eq "62375ab9-6b52-47ed-826b-58e47e0e304b"}
$temp["EnableGroupCreation"] = $True
$setting = Get-AzureADDirectorySetting –Id []Set-AzureADDirectorySetting -Id [] -DirectorySetting $setting
#left ID blank in this post []
Am I still missing something?
- VasilMichevApr 21, 2017MVP
You seem to be using differnt variables. You're setting the EnableGroupCreation to True on the $temp one, then using the $setting. Just copy/paste the example from that article, should work fine. My example was for the MSOL module after all :)