Link to home
Create AccountLog in
Exchange

Exchange

--

Questions

--

Followers

Top Experts

Avatar of richlionel
richlionel

List of mailboxes on server sorted by mailbox size
I have an Exchange 2007 server named Exch1.domain.com. It has about 2000 mailboxes.

I need a list of mailboxes on this server, sorted by size (MB), that includes:

DisplayName
Alias
Email Address

I should also be able to export this to CSV.

Any ideas how to do this in Powershell?

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of XaelianXaelian🇧🇪

Can you try:

Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}}, Alias, PrimarySmtpAddress

Avatar of Manpreet SIngh KhatraManpreet SIngh Khatra🇮🇳

Get-Mailbox | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount

get-mailbox | get-mailboxstatistics | select-object displayname, itemcount,  lastloggedonuser, lastlogontime, lastlogofftime, servername, databasename, @{ expression={$_.TotalItemSize.Value.ToKB()} }

- Rancy

Avatar of XaelianXaelian🇧🇪

Full command to csv:

Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}}, Alias, PrimarySmtpAddress|export-csv C:\stats.csv

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


ASKER CERTIFIED SOLUTION
Avatar of chrismerrittchrismerritt

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

@richlionel - One of my problems with Experts Exchange is when you put time and effort into helping someone who is asking a question and they don't even acknowledge it or anything. Please don't do this.

3 of us have tried to help you, please either mark one or more of the answers as the right ones sharing the points out, or instead let us know if you need more help.

Avatar of Manpreet SIngh KhatraManpreet SIngh Khatra🇮🇳

chrismerritt: I agree totally with you :)
richlionel: As said it very Important you share your feedback so that if something isnt working we can try to tweek and assist you :)

- Rancy

Avatar of richlionelrichlionel

ASKER

I apologise, I was ill for a few days.

I really appreciate the help from everyone in answering! I marked ChrisMerrit's answer as the correct one since that is the one I used and it did exactly what I wanted quite well.  I hope that is the right way to do things (I'm quite new to EE).

But, everyone, thanks again! I appreciate EVERYONE's input.

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.

Exchange

Exchange

--

Questions

--

Followers

Top Experts

Exchange is the server side of a collaborative application product that is part of the Microsoft Server infrastructure. Exchange's major features include email, calendaring, contacts and tasks, support for mobile and web-based access to information, and support for data storage.