The Command
Get-MailboxFolderStatistics mailboxalias | Select Name,@{N="FolderSize (MB)";E={$_.FolderSize.ToMB()}},ItemsInFolder
Replace mailboxalias with the alias (or full identity) of the mailbox you want to check. This returns every folder in the mailbox with its size in MB and item count, which you can pipe further to sort:
Get-MailboxFolderStatistics mailboxalias | Select Name,@{N="FolderSize (MB)";E={$_.FolderSize.ToMB()}},ItemsInFolder | Sort-Object "FolderSize (MB)" -Descending
Sorting descending puts the biggest folders at the top, which is usually what you actually want when hunting for what’s consuming space — commonly the Deleted Items, Sent Items, or a specific archive folder with large attachments.
Exchange Online Equivalent
If the mailbox is in Exchange Online, the modernGet-EXOMailboxFolderStatistics cmdlet is the REST-backed equivalent Microsoft now recommends over the legacy version for better reliability at scale:
Get-EXOMailboxFolderStatistics -Identity mailboxalias -FolderScope All | Select Name,FolderSize,ItemsInFolder | Sort-Object FolderSize -DescendingNote the syntax difference:
-Identity is a named parameter on the EXO version rather than positional as on the legacy Get-MailboxFolderStatistics, and FolderSize comes back as a formatted size value directly rather than needing the ToMB() conversion used above. The legacy cmdlet still works fine against Exchange Online too if you’d rather keep the exact syntax you already know.
Including Subfolders Only
To scope the report to a specific top-level folder and its subfolders rather than the whole mailbox, add-FolderScope (EXO version) or filter on the FolderPath property returned by the legacy cmdlet — useful when you already know a particular folder tree (like a large project archive) is the likely culprit and don’t need the full mailbox breakdown.
Resources
Gear We Recommend
A few general tech accessories worth having alongside this.
Browse our General Tech Accessories picks on AmazonAs an Amazon Associate, TechyGeeksHome earns from qualifying purchases.
Discover more from TechyGeeksHome
Subscribe to get the latest posts sent to your email.
Visitor Rating: 5 Stars