32.8 C
Dubai
Thursday, April 25, 2024

How to Check Mailbox Size and ItemCount in Bulk – Exchange 2010

You can use a short one liner Command to get the mailbox size have added | more in the end of the command so that you can press enter to proceed with a big list

you can remove it if you wish to export it.

To Check for the local Server – 

Get-Mailboxdatabase | Get-MailboxStatistics | Sort TotalItemSize -descending | FT Displayname, TotalItemsize, Itemcount,Database –Autosize | more

 To Check for Database Level – 

Get-Mailbox –Database “Database Name” | Get-MailboxStatistics | Sort TotalItemSize -descending | FT Displayname, TotalItemsize, Itemcount,Database –Autosize | more

 To Check for Server Level –

Get-Mailbox –Server “Server Name” | Get-MailboxStatistics | Sort TotalItemSize -descending | FT Displayname, TotalItemsize, Itemcount,Database –Autosize | more

image

To Export to CSV –

Get-Mailbox -Database “*04? | Get-MailboxStatistics | Sort TotalItemSize -descending | Export-Csv C:\MailboxSize-Descending.csv

Hope its Useful !!

Check this Script as well –

Mailbox Size Report for Exchange 2010/2013/2016 & Office 365

 

Satheshwaran Manoharan
Satheshwaran Manoharanhttps://www.azure365pro.com
Award-winning Technology Leader with a wealth of experience running large teams and diversified industry exposure in cloud computing. From shipping lines to rolling stocks.In-depth expertise in driving cloud adoption strategies and modernizing systems to cloud native. Specialized in Microsoft Cloud, DevOps, and Microsoft 365 Stack and conducted numerous successful projects worldwide. Also, Acting as a Technical Advisor for various start-ups.

Related Articles

5 COMMENTS

    • 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”

LEAVE A REPLY

Please enter your comment!
Please enter your name here

× How can I help you?