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:
27
27
1 . Verify that non-admin users are allowed to create groups:
28
28
29
29
``` powershell
30
- Get-MsolCompanyInformation | Format-List UsersPermissionToCreateGroupsEnabled
30
+ Get-MgBetaDirectorySetting | select -ExpandProperty values
31
31
```
32
32
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:
34
34
35
35
``` 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
+
37
50
```
38
51
39
52
** 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