Exchange Server Share

… Information sharing on Exchange Server …

EMC – Where are Mailbox Total Items & Size (KB) Columns?

You would have noticed that you are not able to see the Total Items and Size (KB) of user’s mailboxes in Exchange Management Console of 2007. Even you are not able to add columns optionally.

image

Like you were able to see in Exchange System Manager of version 2003 displayed below.

image

 

Now question is where to see/add those options… Your answer is run the PowerShell command to see those options.

 

When I run below command in Exchange Management Shell for Database name “Mailbox Database”, it gives similar output to ESM 2003. Only difference is it shows size in Bytes instead of KB.

Get-MailboxStatistics -database “Mailbox Database” | Select DisplayName, LastLoggedOnUserAccount, ItemCount, TotalItemSize, LastLogonTime, LastLogoffTime | Format-Table

 image

Now if I want to export this into CSV the I need to run below command.

Get-MailboxStatistics -Database “Mailbox Database” | Select DisplayName, LastLoggedOnUserAccount, ItemCount, TotalItemSize, LastLogonTime, LastLogoffTime | Export-CSV test.csv

image

Now lets say I want size in MB then I  need to run below command.

Get-MailboxStatistics -Database “Mailbox Database” | Format-Table DisplayName, LastLoggedOnUserAccount, ItemCount, @{expression={$_.totalitemsize.value.ToMB()};label=”Size(MB)”}, LastLogonTime, LastLogoffTime

image

 

If I want to sort this report by Mailbox Size then I need to run below command.

Get-MailboxStatistics -Database “Mailbox Database” | Sort -Property TotalItemsize | Format-Table DisplayName, LastLoggedOnUserAccount, ItemCount, @{expression={$_.totalitemsize.value.ToMB()};label=”Size(MB)”}, LastLogonTime, LastLogoffTime 

image

  • In these examples we got reports for database “Mailbox Database” in same way we can get it for whole server with below command.

      Get-MailboxStatistics -Server MailboxServer01

  • Here we added DisplayName, LastLoggedOnUserAccount, ItemCount, TotalItemSize, LastLogonTime, LastLogoffTime columns in our report and in same way we can add below list of columns …

AssociatedItemCount
Database
DatabaseName
DeletedItemCount
DisconnectDate
DisplayName
Identity
ItemCount
LastLoggedOnUserAccount
LastLogoffTime
LastLogonTime
LegacyDN
MailboxGuid
ServerName
StorageGroupName
StorageLimitStatus
TotalDeletedItemSize
TotalItemSize

 

Technorati Tags: ,

Written by Amit Tank

April 23, 2008 at 3:50 pm

8 Responses

Subscribe to comments with RSS.

  1. good Tip …keep it up with new articles in coming days…

    Prabhu

    June 7, 2008 at 10:13 pm

  2. Awesome!

    Gee…this seems so simple…why, oh why, did M$ leave this out of the GUI?

    On that note: are there any good 3rd party PowerShell GUI apps out there, or do I have to beg one of my programming buddies to write me one?

    You know…something that would come with a bunch of these “missing” commands pre-loaded with the ability to create new ones, while presenting the whole she-bang to you with pretty cornflower blue buttons?

    Clueless

    July 9, 2008 at 4:09 pm

  3. The following version will export to a CSV file with just the mailbox name, mailbox size (in MB), item count, and sort it by mailbox size (descending):

    Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select DisplayName, ItemCount, @{expression={$_.TotalItemSize.value.ToMB()}} | Export-CSV MailboxSizes.csv

    GoodThings2Life

    July 21, 2008 at 7:33 pm

  4. Thanks GoodThings. You know that is all anyone is looking for in the end.

    Anon

    August 12, 2008 at 6:34 pm

  5. […] found a good tips here, the paste/copy follows […]

  6. Tried it and it seems to list out all maiboxes from all stores and databases, even if I specify only the one database. Great for some purposes, but not all.

    Finch

    October 8, 2008 at 7:05 am

  7. I really don’t understand what Microsoft was thinking with some of their Exchange 2007 decisions.

    MORE options=good
    FEWER options=bad

    So allowing people to do things via either a GUI or a command line is GOOD. But taking away things that they used to be able to do graphically and forcing them to do it via command line is BAD.

    This is along the lines of the decision to take away the ability to create users with mailbox via ADUC. This generates more work for sysadmins–not less. It’s a step backwards.

    Whomever made these design decisions has lost touch with Microsoft’s customers.

    Bucket O'Bits

    October 11, 2008 at 8:22 pm

  8. Agree with Bucket – a lot of frustrations! MS was so proud of Exchange 2000/2003 – finally they got rid of two databases (AD and Exchange). Now they decided to return back to Exchange 5.5 era!??

    Kon

    January 20, 2009 at 11:57 pm


Comments are closed.