File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
articles/active-directory/enterprise-users Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -27,13 +27,26 @@ To disable group creation for non-admin users in PowerShell:
27271 . Verify that non-admin users are allowed to create groups:
2828
2929 ``` powershell
30- Get-MsolCompanyInformation | Format-List UsersPermissionToCreateGroupsEnabled
30+ Get-MgBetaDirectorySetting | select -ExpandProperty values
3131 ```
3232
33- 2 . If it returns ` UsersPermissionToCreateGroupsEnabled : True` , then non-admin users can create groups. To disable this feature:
33+ 2 . If it returns ` EnableGroupCreation : True` , then non-admin users can create groups. To disable this feature:
3434
3535 ``` powershell
36- Set-MsolCompanySettings -UsersPermissionToCreateGroupsEnabled $False
36+ Install-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
37+ Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
38+ $params = @{
39+ TemplateId = "62375ab9-6b52-47ed-826b-58e47e0e304b"
40+ Values = @(
41+ @{
42+ Name = "EnableGroupCreation"
43+ Value = "false"
44+ }
45+ )
46+ }
47+ Connect-MgGraph -Scopes "Directory.ReadWrite.All"
48+ New-MgBetaDirectorySetting -BodyParameter $params
49+
3750 ```
3851
3952** I received a max groups allowed error when trying to create a Dynamic Group in PowerShell**
You can’t perform that action at this time.
0 commit comments