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

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...
Upgrading AD Schema for Exchange Server 2010 SP3 m... Hello folks (Are you guys ready for MMS? I’m on my way!) Now that we have the Exchange Server 2013 CU1 the Service Pack 2010 Service Pack 3 became ev...
Rollup Update for Exchange Server 2007/2010 and Se... Exchange Team has just released Rollup Updates for Exchange Server 2007/2010 and Security Updates for Exchange Server 2013. Update Rollup 2 For Exch...
How to test IMAP connectivity In some situations the administrator has to test connectivity of any given protocol, and Exchange Server offers a cmdlet for the vast majority of prot...