While with Exchange 2007 it wasn’t straightforward or easy to get the size and the available whitespace of your Exchange databases, with 2010 is much easier! Now, the Get-MailboxDatabase cmdlet includes the DatabaseSize parameter and the AvailableNewMailboxSpace parameter which shows the whitespace available.
So, all we have to do is run a script like this:
$DBs = Get-MailboxDatabase -Status | ? {$_.Mounted -eq $True} | Sort Name
ForEach ($db in $DBs)
{
$DBsize = $db.DatabaseSize.ToMB()
$DBusers = ($db | Get-Mailbox -ResultSize Unlimited | Measure).Count
$DBWhiteSpace = $db.AvailableNewMailboxSpace.ToMB()
Write-Host "$($db.Name), $DBusers, $DBsize, $DBWhiteSpace"
}
}
No comments:
Post a Comment