In any organization running Exchange 2016 or legacy versions like 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
Exchange 2016 - get mailbox count
Exchange 2016 - Get mailbox count 1

As shown above, we only have 6 mailboxes so the above command will run without a warning, if you have more than 1000 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 on, for that we can run the following command:

  • Get-Mailbox | Group-Object -Property:ServerName | Select-Object name,count
Exchange 2016 - get mailbox count
Exchange 2016 - Get mailbox count 2

As shown above, we can see how many mailboxes are on our 3 servers.

Hope it helps.

    wpChatIcon

    Discover more from COLLABORATION PRO

    Subscribe now to keep reading and get access to the full archive.

    Continue reading