Friday, August 7, 2015

Reporting Quota Status of the Mailboxes in Multiple Databases

Hi folks,

Just wanted to share with you about my recent adventure. I needed to plan .

This code will perfectly work for the scenario when you maintain standard naming conventions for your mailbox databases. This allows you to use wild card when you want to extract information about mailboxes in more than one database, in case you have standard conventions for regions or datacentres.

It will run quickly enough against mailboxes hosted within these databases.

Get-MailboxDatabase DB* |sort Name |Get-MailboxStatistics |Select DisplayName,StorageLimitStatus,TotalItemSize |Export-Csv MbxQuotaStatus.csv -Encoding Unicode

When report has generated it opens in Excel as the text file delimited with commas. To make Excel-like view for further analysis I have launched Excel and clicked Open and browsed for the file.

When file as opened i was asked about the file format I have selected Delimited and also requested to selected to start import at row 2 to avoid rubbish like #TYPE Selected.Microsoft.Exchange.Data.Mapi.MailboxStatistics to be in the file.

After clicking Next I have been presented with the option to select delimiter which has been comma in  my case.

After clicking Next on this and next page I got a nice report as this.