Managing Databases
Here is a simple script that will display the number and type of mailboxes in the Mailbox Database on the console. For example, if you have five Mailbox Databases in your organization and your user's primary mailbox, the archive mailbox and arbitration mailboxes are distributed across these databases; the script will report these different mailbox types for each mailbox database:
$DBs= get-mailboxdatabase | Select Name $UsersPerDB=@() get-mailboxdatabase | foreach-object { $Object=New-Object PSObject $Object | Add-Member NoteProperty -Name "DatabaseName" -Value $_.name $Object | Add-Member NoteProperty -Name "No of User Mailboxes" -Value (get-mailbox -database $_.name).count $Object | Add-Member NoteProperty -Name "No of Archive Mailboxes" -Value (get-mailbox -database $_.name -Archive).count $Object | Add-Member NoteProperty -Name "No of Arbitration Mailboxes" -Value (get-mailbox -database $_.name -Arbitration).count...