Microsoft Exchange Mailbox User Count

How many mailboxes do I have to declare in Cumulus? 

To simplify the task of calculating the number of mailboxes that you need to delcare in Cumulus, we have an easy way to get the answer using PowerShell. Shared mailboxes and mail-enabled groups do not count towards your total number of mailboxes. Follow the steps below to get an accurate count for Office 365 or on-prem Exchange

Results may vary if you are using a hybrid setup and have some user mailboxes hosted on-premises.

Office 365 (Exchange Online)

If this is the first time you connect to the Office 365 online environment via PowerShell, you will need to set the execution policy to allow scripts as its disabled by default. You can refer to this Microsoft article.

  1. Launch PowerShellas an admin from a computer connected to the internet. 
  2. Set the execution policy to type to RemoteSigned
    • Set-ExecutionPolicy RemoteSigned
  3. Once that's completed, run the following commands to get connected:
    • $UserCredential = Get-Credential
      • Enter your global admin credentials for your Office 365 tenant
    • $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

    • Import-PSSession $Session -DisableNameCheckingNote: If you are using MFA with your Office 365 setup, you will need to perform addtional steps before establishing the connection to Office 365 online. Please consult this Microsoft article.

  4. Run the following command to get the total user mailbox count:
    • Get-mailbox -resultsize unlimited -RecipientTypeDetails usermailbox |measure-object
  5. You can now close the session you opened with Office 365 online by running the following command:
    • Remove-PSSession $Session
  6. The number (count) is the correct and accurate number that you will use for you mailbox count in Cumulus.

Exchange On-Premises

Applies to Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019

  1. Connect to your Exchange server
  2. Launch the Exchange shell as admin 
  3. Run the following command:
    • Get-mailbox -resultsize unlimited -RecipientTypeDetails usermailbox |measure-object
  4. The number (count) is the correct and accurate number that you will use for you mailbox count in Cumulus.