Exchange 2016 - Get mailbox count
In any organization running Exchange 2016 or legacy versions of Exchange 2010 or 2013, you may get the request to get a count of all mailboxes in the environment.
This is quite easy to get when running a simple command from the Exchange Management Shell (EMS).
Launch the EMS and run the following command:
- (Get-Mailbox).count
https://collaborationpro.com/wp-content/uploads/2017/10/Count1.png
As shown above, we only have six mailboxes so the above command will run without a warning. If you have more than 1,000 mailboxes then you need to run the following command:
- (Get-Mailbox -Resultsize unlimited).count
Let's take this a step further. You need to know which server has X number of mailboxes. For that we can run the following command:
- Get-Mailbox | Group-Object -Property:ServerName | Select-Object name,count
https://collaborationpro.com/wp-content/uploads/2017/10/Count2.png
As shown above, we can see how many mailboxes are on our three servers.