Go Premium for a chance to win a PS4. Enter to Win


Exchange 2007 mailbox size

Posted on 2011-02-10
Medium Priority
Last Modified: 2012-05-11
What the crap did Microsoft do with the mailbox usage report from 2003?  Used to I could easily export a list of all users that showed their size and how many items, now I've been put on a 2007 box and have only found crappy shell commands to get odd data...depending on the script, sometimes it gives me info for 88 uers, then 93, but my exchange manager says I have 190 users.

Is there any easy way to get an accurate count of each user's size and numbers without the stupid shell...or is there a command line that might actually give me an accurate count?

Question by:Kevin Smith
  • 2
  • 2
  • 2
LVL 34

Expert Comment

by:Shreedhar Ette
ID: 34865449
LVL 71

Expert Comment

by:Chris Dent
ID: 34865504
Hey :)

Normally you want this:
Get-Mailbox | Get-MailboxStatistics | Select-Object DisplayName, TotalItemSize, TotalItemCount

Open in new window

We can convert values into more friendly values, and more is available than I select here. If you want it to a file:
Get-Mailbox | Get-MailboxStatistics | Select-Object DisplayName, TotalItemSize, TotalItemCount | Export-Csv "File.csv" -NoType

Open in new window

Each of the above should be run in the Exchange Management Shell. If you have any trouble executing them please don't hesitate to come back.

As for without the stupid shell... well, no, not unless someone (other than MS) writes a more extensive GUI. MS are pushing lots of the more advanced configuration options in the shell, I'm afraid it's something you would simply have to put up with.

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Author Comment

by:Kevin Smith
ID: 34865954
that worked chris.

why would it pull 93 user names when I have 190 in the mailbox store?
LVL 71

Accepted Solution

Chris Dent earned 2000 total points
ID: 34866103

Hmm well it shouldn't, but it depends how you got the other results. On that level it's concerning. Are you finding the results from the commands I've posted are inconsistent?

To explain, this one pulls all the mailboxes bound to user accounts in your organisation:

Open in new window

If we wanted, we could apply filters there, pulling users from a specific server, or only hidden mailboxes, or something else entirely. It doesn't pull disconnected mailboxes, which you will still see in some parts of the GUI (there are still ways to get at those if you need them).

We take the output from Get-Mailbox, and pass it through to the command to get statistics:
Get-Mailbox | Get-MailboxStatistics

Open in new window

Or you can call that one directly for a specific person, like this:
Get-MailboxStatistics "You"

Open in new window

There's a lot more available than you see by default, this one will show you all of the fields it returns:
Get-MailboxStatistics "You" | Format-List *

Open in new window

Back to my original example, you can Select any of the fields you see here (or just skip select and have all of them and export them to a file).

You can also modify fields. For instance, if you wanted to see sizes in Mb you could do this:
Get-Mailbox |
  Get-MailboxStatistics |
  Select-Object DisplayName, TotalItemCount,
    @{Name='TotalSize';Expression={ $_.TotalItemSize.Value.ToMb() }} |
  Export-Csv "File.csv" -NoType

Open in new window

The shell doesn't mind the line breaks here, and including them tends to make for less of a headache.

The whole thing is exceptionally flexible, it's the bonus of having a decent command line interface over a GUI, but there's no doubt that it makes for a steeper learning curve.

If you do decide it's not so bad feel free to visit the PowerShell area any time with any questions you might have (if this thread doesn't put you off entirely). MS is pushing this language (PowerShell) very hard for all of it's up and coming systems.


Author Closing Comment

by:Kevin Smith
ID: 34866437
perfect, thanks!

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question