SOLVED

Powershell ResultSize not working

Copper Contributor

Hello,

I wrote a small script but for some reason “ResultSize” doesn’t work.

“WARNING: There are more results available than currently displayed. If you want to display all results, increase the value for the ResultSize parameter. but this is already on “unlimited” I already tried with digits but won't works.

 

 

#Connect-ExchangeOnline
$DLList = Import-CSV "C:\temp\Liste_DL_UTF8.csv"


#$DLList.Liste

foreach($Line in $DLList)
{
#Write-Host $Line.Liste
Get-DynamicDistributionGroupMember -ResultSize unlimited -Identity $Line.Liste | Select-Object DisplayName | Export-Csv -Path C:\Temp\DL_Listen_Members\$($Line.Liste)_Members.csv
#Write-Host (Get-DynamicDistributionGroupMember -ResultSize unlimited -Identity $Line.Liste).DisplayName
}

 

Thanks for every help!

 

2 Replies
best response confirmed by SpeedHeed (Copper Contributor)
Solution

Hello @SpeedHeed,

As you already mentioned, you are using -ResultSize unlimited to get all possible results. The warning that you are seeing is there by default, FYI type of thing.

However, there are couple of more things to take into the consideration:

  • The results from this cmdlet are updated every 24 hours. So your results might not be reflected right away.
  • You might also want to include IncludeSoftDeletedObjects switch to include any soft-deleted group members in the results.

Reference: Get-DynamicDistributionGroupMember

Hope that helps.

How to increase the value for theResultSize parameter.@AndySvints 

how to fix

1 best response

Accepted Solutions
best response confirmed by SpeedHeed (Copper Contributor)
Solution

Hello @SpeedHeed,

As you already mentioned, you are using -ResultSize unlimited to get all possible results. The warning that you are seeing is there by default, FYI type of thing.

However, there are couple of more things to take into the consideration:

  • The results from this cmdlet are updated every 24 hours. So your results might not be reflected right away.
  • You might also want to include IncludeSoftDeletedObjects switch to include any soft-deleted group members in the results.

Reference: Get-DynamicDistributionGroupMember

Hope that helps.

View solution in original post