From ad921dfb015d80a726076180b547861d2af685a3 Mon Sep 17 00:00:00 2001 From: Marco Scheel Date: Mon, 25 May 2020 15:52:15 +0200 Subject: [PATCH] Add filter sample for Groups Add "all" unified groups using the filter syntax --- samples/4-UsersAndGroups.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/4-UsersAndGroups.ps1 b/samples/4-UsersAndGroups.ps1 index ad2a7ccd13f..d6652aab81a 100644 --- a/samples/4-UsersAndGroups.ps1 +++ b/samples/4-UsersAndGroups.ps1 @@ -12,6 +12,9 @@ Update-MgUser -UserId $UserId -OfficeLocation $NewLocation # Get all Groups Get-MgGroup -top 999 | Select-Object id, DisplayName, GroupTypes +# Get all unified (Microsoft 365 Groups) Groups +Get-MgGroup -Filter "groupTypes/any(c:c eq 'Unified')" + # Get-Details of a single Group Get-MgGroup -GroupId $groupId | Format-List | more