From e29a4235af0f6a9771232f77241f1f45aca76c47 Mon Sep 17 00:00:00 2001 From: realPrix <89163315+realPrix@users.noreply.github.com> Date: Thu, 5 Dec 2024 09:51:27 +0100 Subject: [PATCH] Fix for manage-creation-of-groups.md The old code only output a limited paged number of elements if you have a lot of groups. My commit fixes this problem by filtering the output before. --- microsoft-365/solutions/manage-creation-of-groups.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft-365/solutions/manage-creation-of-groups.md b/microsoft-365/solutions/manage-creation-of-groups.md index 81cf4298f77..f711f97cf77 100644 --- a/microsoft-365/solutions/manage-creation-of-groups.md +++ b/microsoft-365/solutions/manage-creation-of-groups.md @@ -137,7 +137,7 @@ if(!$settingsObjectID) } -$groupId = (Get-MgBetaGroup | Where-object {$_.displayname -eq $GroupName}).Id +$groupId = (Get-MgGroup -Filter "displayName eq '$GroupName'").id $params = @{ templateId = "62375ab9-6b52-47ed-826b-58e47e0e304b"