Skip to content

Commit 685dfbb

Browse files
committed
Updated groups-troubleshooting.md document with MgGraph cmdlets
1 parent fc7ef85 commit 685dfbb

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

articles/active-directory/enterprise-users/groups-troubleshooting.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,26 @@ To disable group creation for non-admin users in PowerShell:
2727
1. 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**

0 commit comments

Comments
 (0)