Ying Li at myITforum.com

PowerShell & System Center

PowerShell script to list the top 10 mailbox user on your exchange 2007 server

Here is a PowerShell script to identify the top 10 user who has the biggest mailbox on your exchange 2007 server and output the result to Internet Explorer

$strComputer = (Read-Host "Please Enter The Server Name").Toupper()

$ie = new-object -comobject InternetExplorer.Application
$ie.visible = $True
$ie.navigate("About:Blank")
$ie.document.title = "Top 10 Mailbox Users On $strComputer"
$ie.toolbar = "1"
$ie.statusbar = ""

$BigMailUsers = Get-MailboxStatistics -server $strComputer |sort-object -Property totalitemsize -des |select-object Displayname, ItemCount,

@{name='TotalItemSize(MB)';expression={$_.totalitemsize/1MB}} -first 10 |Convertto-html

$ie.Document.Body.InnerHTML = $BigMailUsers

$ie.Document.body.Bgcolor = "MintCream"
$ie.Document.FgColor = "MidnightBlue"

 

Comments

Explorer » PowerShell script to list the top 10 mailbox user on your exchange… said:

Pingback from  Explorer » PowerShell script to list the top 10 mailbox user on your exchange…

# May 6, 2008 9:00 PM