Exchange 2010 Mailboxes Size Report

June 8, 2011

9 comments

The following article describe how to create Mailboxes size report/s in Exchange 2010.

Step 1:

Open “Exchange Management Shell”.

Step 2:

Use one of the following commands:

 

Report mailboxes size in the entire Exchange organization:

Get-Mailbox | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount

Get-Mailbox | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount  | Export-CSV C:\mailboxessize.csv

 

Report mailboxes size in a specific Exchange server:

Get-Mailbox -server servername | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount

Get-Mailbox -server servername | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount  | Export-CSV C:\mailboxessize.csv

 

Report mailboxes size in a specific Exchange server database:

Get-Mailbox -server -database "Mailbox Database 0154525136" | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount

Get-Mailbox -server -database "Mailbox Database 0154525136" | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount | Export-CSV C:\mailboxessize.csv

Note: You can obtain the database name by using the command: Get-MailboxDatabase

Report specific mailbox size:

Get-Mailbox myaliasname | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount

Get-Mailbox myaliasname | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount  | Export-CSV C:\mailboxessize.csv

Note: Instead of using “myaliasname”, you can use the “Display Name” attribute of the mailbox.

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

*

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>

9 comments

  1. Power shell userApril 26, 2012 ב 11:48

    Have you actually tested this? Cause i can tell you the sort does not work as expected

    Reply
    1. Shiva SharmaJuly 30, 2014 ב 17:18

      Problem is, Get-MailboxStatistics output just a display name – not unique and cant really be used as such. The other half of the information you need is in Get-Mailbox :- found answer in following link. once you have the data on all your mailboxes, and the output can be IMPORTED into excel you can do all your sorting etc and delete whatever you dont want

      ***if this is what you were looking for, please click this link and give the guy some credit.. i didnt come up with this, i just found it

      #REM http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Exchange/Q_27828458.html

      $Mailboxes = Get-Mailbox -ResultSize Unlimited
      foreach ($Mailbox in $Mailboxes)
      {
      $Mailbox | Add-Member -MemberType “NoteProperty” -Name “MailboxSizeMB” -Value ((Get-MailboxStatistics $Mailbox).TotalItemSize.Value.ToMb())
      }
      $Mailboxes | Sort-Object MailboxSizeMB -Desc | Select PrimarySMTPAddress, MailboxSizeMB

      #REM – to export this out — do the following ;) enjoy (see the part where it says “Select” you can add additional fields like ALIAS etc to this)

      $Mailboxes = Get-Mailbox -ResultSize Unlimited
      foreach ($Mailbox in $Mailboxes)
      {
      $Mailbox | Add-Member -MemberType “NoteProperty” -Name “MailboxSizeMB” -Value ((Get-MailboxStatistics $Mailbox).TotalItemSize.Value.ToMb())
      }
      $Mailboxes | Sort-Object MailboxSizeMB -Desc | Select PrimarySMTPAddress, MailboxSizeMB | Export-Csv -NoType “C:\temp\Mailboxessize.csv”

      Reply
  2. BenMay 19, 2012 ב 10:46

    You may find this article I wrote helpfull. Please take a look at:
    http://www.oostdam.info/index.php/sectie-blog/51-scripting/337-exchange-2010-get-mailboxstatistics
    Cheers and have fun using the EMS! Ben

    Reply
  3. WilsonLastMay 21, 2012 ב 15:08

    Hi,

    You may also check how to send SMS from MS Exchange 2010 with Ozeki NG SMS Gateway:
    sms-integration.com/p_131-ms-exchange-2010-sms.html

    BR

    Reply
  4. MauroMarch 22, 2013 ב 05:14

    Hi everyone, it’s my first visit at this website, and paragraph is in fact fruitful in favor of me, keep up posting these types of content.

    Reply
  5. ubttqzg@gmail.comApril 19, 2013 ב 05:00

    Renters should review their rental arrangement carefully before signing the following document. The rental agreement is really a legally binding document which ought to be given proper consideration before accepting the agreement. This is important mainly because understanding these terms might be essential if the have to break the lease becomes a real possibility.

    Reply
  6. HuberMay 4, 2013 ב 06:11

    Please let me know if you’re looking for a article author for your blog. You have some really great articles and I feel I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write
    some material for your blog in exchange for a link back to mine.
    Please blast me an e-mail if interested. Thanks!

    Reply
  7. http://www.exlair.comJuly 28, 2013 ב 00:53

    What i do not realize is really how you are no longer actually a lot more smartly-liked than you might be now. You’re very intelligent. You understand consequently considerably in relation to this matter, produced me for my component consider it from so many various angles. Its like ladies and males don’t seem to become concerned until it is some thing to do with Lady gaga! Your individual stuffs great. All the time deal with it up!

    Reply
  8. Gurmeet SinghOctober 24, 2013 ב 13:47

    I need to get the list where “whenmailboxcreated” , totalItemCount” and “PrimarySMTPAddres” shows in one script.

    Reply