Home > Microsoft > Powershell: Exchange – List all mailboxes in one database

Powershell: Exchange – List all mailboxes in one database

April 23, 2014

To list all mailboxes in one database and sort it by size, use this nice PowerShell line:

Get-MailboxStatistics -Database <DATABASENAME> | select DisplayName, ItemCount, TotalItemSize | Sort-Object TotalItemSize -Descending

 

If you want to export the list to an CSV file, put “| Export-CSV C:\MailBoxSize.CSV” at the end of the PowerShell line.

%d bloggers like this: