How to Show Mailboxes, Their Sizes, in Each Database

Good morning experts,
I have an AD domain (2008 R2) with an Exchange 2010 mail server. I am looking for a Powershell script that will show all of the databases, and list the mailboxes and sizes within each database. The output I desire is csv, although print to the screen is ok also.
CraigManNetwork AdminAsked:
Who is Participating?
 
Viral RathodConnect With a Mentor ConsultantCommented:
0
 
Exchange_FreakCommented:
Try this

Get-DatabaseStatistics | Export-Csv c:\windows\temp\report.csv -Force -NoType

0
 
Viral RathodConsultantCommented:
0
 
Viral RathodConsultantCommented:
Try following power shell command to get the mailboxsize,total item, email address etc....

Get-Mailbox -server EXCH14-MBX1 | Select-Object name,primarysmtpaddress, DisplayName,Database,@{n="Size(MB)";e =
   {$MBXstat = Get-MailboxStatistics $_.name; $MBXstat.totalItemsize.value.toMB()}},@{n="Items"; e = {$MBXstat = Get-
    MailboxStatistics $_.name ; $MBXstat.itemcount}}
0
 
CraigManNetwork AdminAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.