Archive Mailbox Stats

Although Personal Archives in Exchange 2010 are often in cheaper and larger storage than “normal” mailboxes, we still need to keep an eye on them to check how archives are growing and how (if!) users are using it.

Here’s a simple script to get some statistics regarding all the archive mailboxes in your environment:

 $mbcombCollection= @()

$archiveMbxs= Get-Mailbox -Archive -ResultSize Unlimited | Select Identity, ArchiveWarningQuota, ArchiveQuota

ForEach ($mbxin$archiveMbxs)

{

       $mbxStats= Get-MailboxStatistics $mbx.Identity -Archive | Select DisplayName, StorageLimitStatus, TotalItemSize, TotalDeletedItemSize, ItemCount, DeletedItemCount, Database

 

       $mbcomb=“” | Select“Display Name”, StorageLimitStatus, “TotalItemSize (MB)”, “TotalDeletedItemSize (MB)”, ItemCount, DeletedItemCount, Database, “ArchiveWarningQuota (GB)”, “ArchiveQuota (GB)”

 

       $mbcomb.“Display Name”=$mbxStats.DisplayName

       $mbcomb.StorageLimitStatus =$mbxStats.StorageLimitStatus

       $mbcomb.“TotalItemSize (MB)”= [math]::round($mbxStats.TotalItemSize.Value.ToMB(), 2)

       $mbcomb.“TotalDeletedItemSize (MB)”= [math]::round($mbxStats.TotalDeletedItemSize.Value.ToMB(), 2)

       $mbcomb.ItemCount =$mbxStats.ItemCount

       $mbcomb.DeletedItemCount =$mbxStats.DeletedItemCount

       $mbcomb.Database =$mbxStats.Database

       $mbcomb.“ArchiveWarningQuota (GB)”=$mbx.ArchiveWarningQuota.Value.ToGB()

       $mbcomb.“ArchiveQuota (GB)”=$mbx.ArchiveWarningQuota.Value.ToGB()

       $mbcombCollection+=$mbcomb

}

#$mbcombCollection

$mbcombCollection | Export-Csv D:\Scripts\Reports\”ArchiveStats_$(Get-Date -f ‘yyyyMMdd’).csv”-NoType

About The Author

Leave a Comment

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top