Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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.

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why


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


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
On September 18, Experts Exchange launched the first installment of the Help Bell, a new feature for Premium Members, Team Accounts, and Qualified Experts. The Help Bell will serve as an additional tool to help teams increase question visibility.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Suggested Courses

719 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