Display mailbox size in Exchange 2007

To display mailbox size in Exchange 2007 run this command in Exchange Management Shell.
get-mailboxstatistics | fl displayname, totalitemsize

To pipe the output into a text file.
get-mailboxstatistics | fl displayname, totalitemsize > c:\mailboxsize.txt

veiwing mailbox sizes in exchange 2007

1 Comment

  1. Morten Sorensen says:

    I run the below code (PS1 file) as a task every 24h:

    Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin

    $date = get-date -uformat %Y-%m-%d_%H-%M-%S
    Get-User -ResultSize Unlimited | Where {$_.RecipientType -eq "UserMailbox"} | Select DisplayName, Company, City | foreach {
    $MailboxInfo = Get-Mailbox -identity $_.displayName
    $MailboxStat = Get-MailboxStatistics -identity $_.displayName
    Add-Member -InputObject $_ noteProperty UseDefault $MailboxInfo.UseDatabaseQuotaDefaults
    Add-Member -InputObject $_ noteProperty TotalItems $MailboxStat.ItemCount
    Add-Member -InputObject $_ noteProperty TotalSizeMB $MailboxStat.TotalItemSize.Value.ToMB()
    Add-Member -InputObject $_ noteProperty DeleteItems $MailboxStat.DeletedItemCount
    Add-Member -InputObject $_ noteProperty DeletedSizeMB $MailboxStat.TotalDeletedItemSize.Value.ToMB() -PassThru
    } | Export-Csv -Path \\servername\MailboxSize_$date.csv

    it will dump a csv file with the date in the file name in a specified folder you can then use that data as you please!

Leave a Comment