Skip to content

Commit dacaf89

Browse files
authored
Update manage-creation-of-groups.md
Updated Powershell script to retrieve all groups, otherwise it returns a blank groupid if there are too many groups
1 parent 46263e2 commit dacaf89

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)