richlionel
asked on
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?
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?
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={$_.TotalItemSi ze.Value.T oKB()} }
- Rancy
get-mailbox | get-mailboxstatistics | select-object displayname, itemcount, lastloggedonuser, lastlogontime, lastlogofftime, servername, databasename, @{ expression={$_.TotalItemSi
- Rancy
Full command to csv:
Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="Total ItemSize(M B)";expres sion={$_.T otalItemSi ze.Value.T oMB()}}, Alias, PrimarySmtpAddress|export- csv C:\stats.csv
Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="Total
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@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.
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.
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
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
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.
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.
Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="Total