Skip to content

Commit

Permalink
Merge pull request #5743 from mpoulson/mpoulson/5741
Browse files Browse the repository at this point in the history
Fix 5741 - Add missing -All flag on get-mggroup to enumerate all groups.
  • Loading branch information
NikCharlebois authored Feb 12, 2025
2 parents 87f8f91 + 68b31d9 commit a967f6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Change log for Microsoft365DSC
# UNRELEASED

* AADGroupEligibilitySchedule
* FIXES [#5741] Missing -All variable which prevented enumeration of more than 100 Groups

# UNRELEASED

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ function Export-TargetResource
try
{

$groups = Get-MgGroup -Filter "MailEnabled eq false and NOT(groupTypes/any(x:x eq 'DynamicMembership'))" -Property "displayname,Id" -CountVariable CountVar -ConsistencyLevel eventual -ErrorAction Stop
$groups = Get-MgGroup -Filter "MailEnabled eq false and NOT(groupTypes/any(x:x eq 'DynamicMembership'))" -Property "displayname,Id" -CountVariable CountVar -All -ConsistencyLevel eventual -ErrorAction Stop
$j = 1
if ($groups.Length -eq 0)
{
Expand Down

0 comments on commit a967f6f

Please sign in to comment.