Exchange 2010 get information about mailbox size

This post is also available in: Polish

Information about the amount of space that occupies a particular mailbox, we can easily preview the Exchange Management Console.

Unfortunately, if we want to get more information about the mailboxes, or mailboxes that meet that special condition, the realization of such a task in the EMC will be very time consuming.

In such a case comes to us from the console using the Exchange Management Shell (EMS) in which the PowerShell commands, we can get a lot of interesting information on the mailboxes located on Microsoft Exchange.

Display all information about the mailbox:

Get-MailboxStatistics john.smith@domena.com | FL

We receive a long list of information about the mailbox, but if we only care about the number of items in a mailbox, which takes place, and the number of deleted items, you can use the following command:

Get-MailboxStatistics john.smith@domena.com | select DisplayName, TotalItemSize, TotalDeletedItemSize, TotalItems

 

If we are interested in mailboxes in a particular database or on a particular server, then we can use:

Get-Mailbox -Database MailboxDatabase -ResultSize unlimited | Get-MailboxStatistics | select DisplayName, TotalItemSize, TotalDeletedItemSize, TotalItems
Get-Mailbox -server MBXServer -ResultSize unlimited | Get-MailboxStatistics | select DisplayName, TotalItemSize, TotalDeletedItemSize, TotalItems

 

If we want to get only information about disabled mailboxes, we must use properties DisconnectedDate

Get-MailboxStatistics -Server MBXServer | where { $_.DisconnectDate -ne $null } | select DisplayName,DisconnectDate | sort DisconnectDate
Get-MailboxStatistics -Database "MailboxDatabase" | Where { $_.DisconnectDate -ne $null } | select DisplayName, DisconnectDate,TotalItemSize, TotalDeletedItemSize

 

Total size in MB of all the mailboxes located in a specific database:

Get-Mailbox -Database "MailboxDatabase" | Get-MailboxStatistics | %{$_.TotalItemSize.Value.ToMB()} | Measure-Object -sum

or the sum of all deleted items to the mailboxes in a specific database:

Get-Mailbox -Database "MailboxDatabase" | Get-MailboxStatistics | %{$_.TotalDeletedItemSize.Value.ToMB()} | Measure-Object -sum

 

Print Friendly
Tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>