Skip to content

Commit ad921df

Browse files
authored
Add filter sample for Groups
Add "all" unified groups using the filter syntax
1 parent 6c4b62c commit ad921df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

samples/4-UsersAndGroups.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Update-MgUser -UserId $UserId -OfficeLocation $NewLocation
1212
# Get all Groups
1313
Get-MgGroup -top 999 | Select-Object id, DisplayName, GroupTypes
1414

15+
# Get all unified (Microsoft 365 Groups) Groups
16+
Get-MgGroup -Filter "groupTypes/any(c:c eq 'Unified')"
17+
1518
# Get-Details of a single Group
1619
Get-MgGroup -GroupId $groupId | Format-List | more
1720

0 commit comments

Comments
 (0)