You want to find the largest user mailboxes by the total size of all items.
Get-ExoMailbox -RecipientTypeDetails Usermailbox -ResultSize Unlimited |
Select-Object -Property Identity |
Get-EXOMailboxStatistics -PropertySet All |
Sort-Object -Property TotalItemSize -Descending |
Select-Object -Property DisplayName, TotalItemSize -First 10
If you have a large organization, this could take some time to execute.
Adjust the -First 10
to suit your needs.
This recipe can be modified to find other properties.
Using the Get-EXOMailboxStatistics -PropertySet All
provides access to all the properties1.
Change this recipe to find the largest user mailboxes by item count instead of total item size.
Get-ExoMailbox -RecipientTypeDetails Usermailbox -ResultSize Unlimited |
Select-Object -Property Identity |
Get-EXOMailboxStatistics -PropertySet All |
Sort-Object -Property ItemCount -Descending |
Select-Object -Property DisplayName, ItemCount -First 10
Get-EXOMailboxStatistics
Property Set documentation ↩