The Exchange 2007 Wiki

Mailbox Size Report

Description

Script displays table with mailbox size statistics. 

Usage

Run from Exchange Management Shell. 

Sample Script

get-mailbox | get-mailboxstatistics | select-object DisplayName,TotalItemSize,StorageLimitStatus,LastLogonTime

 

Disclaimer: The sample scripts are meant to serve as examples and may need modifications before they will work in your environment. The authors of the script are not responsible for any negative outcome that may result from using them. 

 

Another Sample

Get-MailboxStatistics -Database "mailbox database" | Sort -Property DisplayName | ft DisplayName, @{expression={$_.totalitemsize.value.ToMB()};label="Mailbox Size(MB)"}, itemcount, lastlogontime, lastlogofftime,lastloggedonuseraccount

This example get mailboxes from a mailbox database named "mailbox database", Output is sortet on DisplayName and the mailboxsize is displayed in MB

Comments

From cweatherford - 4/10/09 11:18 AM

Well, I'm a little late to the scene (only by a couple of years) but thought I would add what we use.  

This will display for an entire server.
get-mailbox -Server "MailboxServer" | get-mailboxstatistics | sort -Property TotalItemSize | select-object DisplayName,@{expression={$_.totalitemsize.value.ToMB()};Name="Mailbox Size (MB)"},StorageLimitStatus,LastLogonTime

You can subsitute the [-Server "MailboxServer"] with [-Database "MailboxServer\Mailbox Database"] to see just a single database or leave both of these off to see all mailboxes in the org.

From hkok - 4/1/08 6:33 AM

I think you just have to morph this.  I got this running on Exchange 2007 just fine.

Get-Mailbox -server <exch-servername> | get-mailboxstatistics | select-object DisplayName,@{expression={$_.TotalItemSize.value.ToKB()}},Itemcount,ServerName

 

The question I have is can we have a single script that works on both Exchange 2007 and 2003?  It doesn't appear management on Exchange 2007 applies to 2003. 

From evetsleep - 1/26/07 8:12 AM

This actually doesnt produce a mailbox size report at all.  It lists the DisplayName, ItemCount, StorageLimitStatus, and last LastLogonTime.  A mailbox "size" report should return the actual size of the mailboxes:

get-mailbox | get-mailboxstatistics | select-object DisplayName,TotalItemSize,StorageLimitStatus,LastLogonTime

 You could go further and format it, sort it, and even e-mail it (which I do).

From bulldookie - 1/26/07 6:06 AM

Where's the script? 

Site

Changes
Index
Search

 

User

 

Log In
Register

 
 

Last Modified 1/26/07 11:30 PM