Exchange Server Share

April 23, 2008

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

Filed under: Exchange,Exchange 2003,Exchange 2007,PowerShell — Amit Tank @ 3:50 pm

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: ,
About these ads

8 Comments

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

    Comment by Prabhu — June 7, 2008 @ 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?

    Comment by Clueless — July 9, 2008 @ 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

    Comment by GoodThings2Life — July 21, 2008 @ 7:33 pm

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

    Comment by Anon — August 12, 2008 @ 6:34 pm

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

    Pingback by Exchange 2007 and mailboxes size list ? — September 2, 2008 @ 3:23 pm

  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.

    Comment by Finch — October 8, 2008 @ 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.

    Comment by Bucket O'Bits — October 11, 2008 @ 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!??

    Comment by Kon — January 20, 2009 @ 11:57 pm


RSS feed for comments on this post.

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 29 other followers

%d bloggers like this: