Getting Exchange Server numbers with PowerShell

Share this:

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

Solution


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

image

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

image

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.

(Get-ExchangeServer).count

image

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

image

Written by Anderson Patricio

Anderson Patricio

Anderson Patricio is a Canadian MVP in Cloud and Datacenter Management, and Office Server and Services, besides the Microsoft Award he also holds a Solutions Master (MCSM) in Exchange and several other certifications. Anderson has been contributing to the Microsoft Community with articles, tutorials, blog posts, twitter, forums and book reviews. He is a regular contributor here at ITPROCentral.com, MSExchange.org, Techgenix.com and Anderson Patricio.org (Portuguese).

Related Post

PowerShell Script to fix Exchange Server 2013 Secu... I wrote the following PowerShell script to help fixing the issue reported by Microsoft Exchange Team (http://blogs.technet.com/b/exchange/archive/2013...
Exchange 2013 Security Update MS13-061 Status Upda... MSExchangeTeam released a status update about the new Security Update where customers running Exchange Server 2013 are facing issues. Late last night...
How to … Renew Certificates in Exchange Server 201... In Today’s post we are going over the process to renew a Certificate in Exchange Server 2010. For this blog post I’m going to use Digicert and you ca...
Exporting PSTs based on Organization Unit In some scenarios the administrator may want to export all mailboxes of a specific OU to PST. Using Exchange Server 2013/2016 this can be accomplished...