Getting Exchange Server numbers with PowerShell

In this Tutorial we are going over a few cmdlets to get the number of Exchange Server in your Exchange Organization.


I’m often asked about number of servers when visiting a customer, although the process is simple to go to the Exchange Management Console (if using Exchange Server 2010) or Exchange Admin Center (2013/2016) and start counting the servers, but I prefer to use PowerShell to save some time, especially in larger organizations.

In my current customer the questions were more related to the number of servers and license, such as: How many Exchange Servers I have running around in my Organization? Second, number of Exchange servers per roles (well they still have Exchange Server 2010)?  Here we can see a couple of the questions and how to gather the information.

I need a list of all Exchange Servers, their roles, and edition in use…

In order to get a list of all Exchange Servers, roles and editions we can use the following cmdlet, nothing new here just a short list of the parameters that we are really interested in getting.

Get-ExchangeServer | ft Name,ServerRole,Edition –AutoSize


I need to know the number of servers per role in use in my Exchange Organization..

That is easy when using Group-Object cmdlet, the following cmdlet will group all roles in use and it will provide the number of servers.

Get-ExchangeServer | Group-Object ServerRole | fl


How many servers in total?

In the first cmdlet we listed all the servers, we will use just the first cmdlet and use ().count to retrieve the total number of servers. No human counting to get to that number.



How about editions in use?

Same line of thought that we used in previous questions, just run the following cmdlet.

Get-ExchangeServer | Group-Object Edition| fl