On-Screen View
Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited | Format-Table Name, Identity, ItemsInFolder, FolderSize
Export to CSV
For anything beyond a quick glance, exporting to CSV (then opening in Excel for formatting) is far more usable:Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited | Select-Object Name, Identity, ItemsInFolder, FolderSize | Export-Csv C:\SharedMailboxInfo.csv -NoTypeInformationReplace
C:\SharedMailboxInfo.csv with whatever export location and filename suits you. Note the swap from Format-Table to Select-Object in the export version — piping Format-Table output into Export-Csv produces a broken, unusable CSV, since Format-Table is meant for screen display, not structured data output.
Exchange Online Equivalent
If your mailboxes are in Exchange Online (or a hybrid environment where you’re querying the cloud side), use the modernGet-EXOMailbox cmdlet from the ExchangeOnlineManagement module instead of Get-Mailbox — it’s built specifically for Exchange Online, and Microsoft recommends it over the legacy remote-PowerShell cmdlets for better performance and reliability at scale:
Connect-ExchangeOnline Get-EXOMailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited | Select-Object Name, Identity, ItemsInFolder | Export-Csv C:\SharedMailboxInfo.csv -NoTypeInformationOne thing to watch:
Get-EXOMailbox doesn’t return FolderSize directly in the same way — for mailbox size specifically, pair it with Get-EXOMailboxStatistics (which returns TotalItemSize) and join the two on the mailbox identity if you need size and general shared-mailbox metadata in one export.
Adding More Detail
Both commands above can be extended with extra properties useful for an audit — for example, addingDepartment, Office, or GrantSendOnBehalfTo (to see who’s been given send-on-behalf rights to each shared mailbox) to the Select-Object list turns this from a simple inventory into a genuinely useful access-review report.
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.