dostanete ve výstupu – jméno serveru , Storage groups , jméno , počet mailboxů v DB
Get-MailboxDatabase | Select Server, StorageGroupName, Name, @{Name=“Number Of Mailboxes“;expression={(Get-Mailbox -Database $_.Identity | Measure-Object).Count}} | Format-Table -AutoSize
převzato a odzkoušeno
http://exchangeshare.wordpress.com/2009/07/27/exchange-2007-database-statistics-in-powershell/
Velikost DB
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=“Size (MB)“;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)/1024KB; [math]::round($size, 2)}}, @{Name=“No. Of Mbx“;expression={(Get-Mailbox -Database $_.Identity | Measure-Object).Count}} | Format-table -AutoSize
velikost DB