Monday 29 November 2010

Microsoft Exchange User Mailbox Sizes, enumerate data to a CSV file

The following Exchange Management Shell (EMS) command, will assist your IT department to populate mailbox sizes of all employees associated with a particular mailbox datastore.

Launch the EMS tool, at the command prompt type:

Get-MailboxStatistics -Database "NAME OF YOUR DATASTORE" | Select DisplayName, TotalItemSize, ItemCount, StorageLimitStatus |sort TotalItemSize |Export-Csv "ANYWHERE ON DISK"

Now a working example let assume the datastore is named "Exchange DS" and file will named stats and placed on C:\

Get-MailboxStatistics -Database "Exchange DS" | Select DisplayName, TotalItemSize, ItemCount, StorageLimitStatus |sort TotalItemSize |Export-Csv "C:\stats.CSV"

Now open the CSV file with Microsoft Excel and bingo!
Enjoy!

1 comment:

Ravinder Jamgotre said...

NOTE: When I say command prompt above; I mean within the EMS window...