Hi everyone

I am trying find/create a report that shows me the top 10 users with the largest Exchange mailbox over a certain size.

I am not having much luck, can anyone assit with this??

Thanks

Greg

5 Spice ups

In Management Shell use the below command to list all mailboxes by size.

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

I just go into ESM, go to mailboxes, then sort by mailbox size. I then do a screenshot, then crop with paint.

I think there is a widget on the desktop homepage, but haven’t used it yet.

1 Spice up

Can you start with this one?

http://community.spiceworks.com/reports/516

This will give you the top 10 in Exchange 2010

Get-MailboxDatabase “<insert database name or don’t enter one for all DB’s>” | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount | Select –first 10 >> C:*name_of_file*.txt

Replace the proper items in that line of code with your environment.

-Jay

1 Spice up

what version of exchange are you using ?

if you are running a single exchange and you are only looking for the top 10 mailboxes by size you can just you can just look at the mailbox store, mailboxes and order the list by size.

stef

Stefuk - We are using 2010.

Thanks for all your help guys. Super helpful

$a = “”
$a = $a + “BODY{font-family:Arial;background-color:peachpuff;}”
$a = $a + “TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}”
$a = $a + “TH{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:thistle}”
$a = $a + “TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:PaleGoldenrod}”
$a = $a + “”
$header = “

Users Mailbox Size Status

Get-Mailbox -database “Your Mailbox Database” | Get-MailboxStatistics | Sort-Object TotalItemSize -descending |Select-Object DisplayName,ItemCount,@{name=“MailboxSize”;exp={$_.totalitemsize}} -first 2500 | ConvertTo-Html -head $a -body $header|Out-File “c:\Scripts\ReportGetMailboxSizes.htm”
#Invoke-Expression C:\Scripts\ReportGetMailboxSizes.htm

$smtp = “Your_SMTP_SERVER. I use localhost”
$from = “Your_From_Address”
$to = “Your_To_Address”
$body = get-content “C:\Scripts\ReportGetMailboxSizes.htm”
$subject = “Users Mailbox Size Status”

function Send-Mail{
param($smtpServer,$from,$to,$subject,$body)
$smtp = new-object system.net.mail.smtpClient($SmtpServer)
$mail = new-object System.Net.Mail.MailMessage
$mail.from = $from
$mail.to.add($to)
$mail.subject = $subject
$mail.body = $body

Send email in HTML format

$mail.IsBodyHtml = $true
$smtp.send($mail)
}

Send-Mail -smtpServer $smtp -from $from -to $to -subject $subject -body $body