Skip to content

Commit 71a4656

Browse files
authored
Update manage-creation-of-groups.md
Added -All parameter to Get-MgBetaGroup in line 29 to prevent the script from only searching the first 100 groups. In large environments, this script won't work otherwise because it can't find the specified GroupID so GroupCreationAllowedGroupId will remain empty and nobody can create groups.
1 parent e6453d6 commit 71a4656

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

microsoft-365/solutions/manage-creation-of-groups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ if(!$settingsObjectID)
136136
}
137137
138138
139-
$groupId = (Get-MgBetaGroup | Where-object {$_.displayname -eq $GroupName}).Id
139+
$groupId = (Get-MgBetaGroup -All | Where-object {$_.displayname -eq $GroupName}).Id
140140
141141
$params = @{
142142
templateId = "62375ab9-6b52-47ed-826b-58e47e0e304b"

0 commit comments

Comments
 (0)