Skip to content

Commit d497b45

Browse files
authored
Merge pull request #239 from marcoscheel/patch-1
Add filter sample for Groups
2 parents 6cc5cb6 + 6db0369 commit d497b45

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)