
Part IV: Automating Administration
480
Why did I say similar to Figure 16 - 10 ? Well, to get this printed in the book I had to change the font sizes
and colors. If you were to run this, you would still get a nice looking chart. Of course, you could also
spend five minutes modifying the colors, sizes, and other formatting options to make it look just like you
want it to.
You can obtain more information about using PowerGadgets including a free trial of the software at
powergadgets.com .
Creating reports for mailbox size has always been a center of contention in the Exchange administrators
communities. The debate has now changed from how to create the report into how detailed to make the report
now that the tools are available.
Getting the Database File Size
Another interesting script that can be used to show off some of these PowerShell techniques is getting the
database file sizes on disk. This script would be useful when determining backup sizing, or storing the data
to trend file growth:
$server = [System.Environment]::MachineName
$db = get-MailboxDatabase -server $server
foreach ($objItem in $db)
{
$dbsize = get-childitem $objItem.EdbFilePath
Write-Host “Server\StorageGroup\Database” $objItem.Identity
Write-Host “Size(KB)” $dbSize.Length
}
The first thing this script does is obtain a list of all of the mailbox stores on the server. Then for each
mailbox store ...