Forum Discussion
Motly-2000
May 16, 2022Copper Contributor
Get-EXOMailboxFolderStatistics result limit 1000 items
EHLO community, I have a PowerShell scripted process to extract mailbox statistics for a group of large mailbox users 80-90GB. Many of these users demand to keep their primary mailbox full of all...
Motly-2000
May 18, 2022Copper Contributor
Thank you for the reply, yes I'm an idiot, yes the folder stats is what I meant, big difference.
Updated the post.
Difficult scenario to test without a mailbox with over 1000 top level or nested folders.
I'm hoping I missed something obvious but all tests of both Get-MailboxFolderStatistics/Get-ExOMailboxFolderStatistics, now limit at 1000.
Thanks again.
Updated the post.
Difficult scenario to test without a mailbox with over 1000 top level or nested folders.
I'm hoping I missed something obvious but all tests of both Get-MailboxFolderStatistics/Get-ExOMailboxFolderStatistics, now limit at 1000.
Thanks again.
Network23
Jun 07, 2022Copper Contributor
Motly-2000 VasilMichev TonyRedmond
Hi,
Good news, I opened a case last week from O365 support, and it seems they just added the resultsize parameter to the Get-MailboxFolderStatistics. The following command :
(Get-MailboxFolderStatistics -Identity $TargetMailbox -resultsize unlimited).Count
on our big big mailbox is now returning more than 1000 results.
Thanks for your assistance.
- SatnazOct 11, 2024Copper ContributorThis worked, Thank you.
I used the below script to count sub folders on my biiiig mailbox.
$Mailbox = Get-Mailbox -Identity "email address removed for privacy reasons"
$Folders = $Mailbox |
Get-MailboxFolderStatistics -ResultSize Unlimited | # Ensure all folders are retrieved
Where-Object { $_.FolderPath -notmatch '^\$' } | # Exclude the root folder
Measure-Object |
Select-Object -ExpandProperty Count
$Result = New-Object -TypeName PSCustomObject -Property @{
Username = $Mailbox.Alias
FolderCount = $Folders
}
$Result |
Select-Object -Property Username, FolderCount - Kishore2010May 18, 2023Copper Contributor
Even after specifying Result size parameter its showing only 1000 folders Network23
- TonyRedmondJun 07, 2022MVPThat's very interesting. They updated it for Get-MailboxFolderStatistics but not for Get-ExoMailboxFolderStatistics (probably because of pagination). I'll let the people who I was bugging know about the resolution. Sometimes one part of Microsoft doesn't communicate with another...