Date created: Sunday, December 11, 2011 8:28:47 PM. Last modified: Thursday, December 13, 2012 11:41:20 AM
Exchange DB Size
Print out the size and number of mailboxes of each database;
Get-MailboxDatabase | Select Server, StorageGroupName, Name, @{Name="Size (GB)";Expression={$objitem = (Get-MailboxDatabase $_.Identity); $path = "`\`\" + $objitem.server + "`\" + $objItem.EdbFilePath.DriveName.Remove(1).ToString() + "$"+ $objItem.EdbFilePath.PathName.Remove(0,2); $size = ((Get-ChildItem $path).length)/1048576KB; [math]::round($size, 2)}}, @{Name="No. Of Mbx";expression={(Get-Mailbox -Database $_.Identity | Measure-Object).Count}} | Format-table -AutoSize
Example output:
Server StorageGroupName Name Size (GB) No. Of Mbx ------ ---------------- ---- --------- ---------- MAILSTORE01 First Storage Group Mailbox Database 31.07 96
Previous page: Exchange Certificate
Next page: Exchange Mailbox Stats (Last Logon)