Gathering Mailbox Counts in Exchange

Scenario:  You need to gather Mailbox Counts in your Exchange Environment.  You need to gather these types of counts: Total Mailboxes in your Exchange Organization, Total Mailboxes per Server, and/or Total Mailboxes per Database.


Run the following:
1. Total Mailboxes in the Exchange Organization
(Get-mailbox -resultsize unlimited).count

2. Total Mailboxes per Mailbox Server
Get-Mailbox -resultsize unlimited | Group-Object -Property:ServerName | Select-Object Name,Count

3. Total Mailboxes per Database
Get-Mailbox -resultsize unlimited | Group-Object -Property:Database | Select-Object Name,Count


If you know specific information for the server or database,  you can run the following:

Server:  (Get-MailboxServer MBX01| Get-mailbox -resultsize unlimited).count
Database:  (Get-MailboxDatabase DB01 | Get-mailbox -resultsize unlimited).count