Exchange 2010 Mailbox Stats into a CSV

Posted: September 4, 2012 in Exchange, Scripts

Just a quick one liner to grab some quick mailbox stats and dump them into a CSV.
Get-Mailbox | Get-MailboxStatistics | where {$_.ObjectClass -eq "Mailbox"} | Sort-Object TotalItemSize -Descending | Select @{label="User";expression={$_.DisplayName}},@{label="Active Item Size (MB)";expression={$_.TotalItemSize.Value.ToMB()}},@{label="Deleted Item Size (MB)";expression={$_.TotalDeletedItemSize.Value.ToMB()}},@{label="Items";expression={$_.ItemCount}},@{label="Storage Limit";expression={$_.StorageLimitStatus}} | Export-CSV C:\MBStats.csv

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s