CodeTwo Base.title

How to list Exchange servers and their roles

Problem:

You need to list all your Exchange servers along with their installed roles or check the build version number of your Exchange Server.

Solution:

See this section for newer Exchange Servers, i.e. 2013 and 2016, or mixed environments (2007/2010 + 2013/2016).

See this section for older Exchange Servers, i.e. 2007 and 2010.

Exchange 2013 and 2016 or mixed environments

To get a list of all your Exchange servers, execute the following PowerShell cmdlet in your ems Exchange Management Shell:

Get-ExchangeServer | select name, serverrole, edition, admindisplayversion, isClientAccessServer | fl

The command above will produce a tailored list of all Exchange servers in your environment with their names, roles, editions and versions displayed.

An example of the cmdlet output.
Fig. 1. An example of the cmdlet output.

Keep in mind that in heterogeneous (mixed) environments, i.e. two or more Exchange servers with different Microsoft Exchange Server versions installed (e.g. Exchange 2010 + Exchange 2013), the above-mentioned cmdlet will display proper results only when executed in the ems Exchange Management Shell of the newer Exchange Server.

Be aware that if the cmdlet above is executed in Exchange Server 2016 CU2 (build 466.34) or newer, the serverrole property will not display info on the CAS roles installed, and this is by design. In that case, see if the IsClientAccessServer property returns True (which means that your server is CAS).

The cmdlet output for Exchange 2016 CU2, see CAS role missing in serverrole property but IsClientAccessServer returning true.
Fig. 2. The cmdlet output for Exchange 2016 CU2. Notice the CAS role missing in the serverrole property despite IsClientAccessServer returning True.

Exchange 2007 and 2010

To get a list of all your Exchange servers, execute the following PowerShell cmdlet in your ems Exchange Management Shell:

Get-ExchangeServer | select name, serverrole, edition | fl

The command above will produce a tailored list of all Exchange servers in your environment with their names, roles and edition displayed. However, in Exchange Server 2007 and 2010, the build number displayed by Get-ExchangeServer with AdminDisplayVersion selected does not reflect the actual build number properly. This is by design in Exchange Servers older than 2013.

Now, to get the proper build numbers, go to each of your servers and execute the following cmdlet in the ems Exchange Management Shell of each server manually (or you can do it remotely, starting Exchange 2010 and later):

Get-Command Exsetup.exe | ForEach-Object {$_.FileVersionInfo}

or use the alias-based, shortened version:

GCM Exsetup.exe | % {$_.FileVersionInfo}

449-2
Fig. 3. First result - wrong build, second result - proper build.

See also:

  • Applies to: Other
  • Categories: How-To
  • Last modified: 2016-12-06
  • Created: 2014-12-19
  • ID: 449
  • Keywords: role, roles, build, builds, version, versions
Our Clients:
Unicef
Facebook
Shell
T-Systems
Loreal
Casio
UPS Israel
Oford University
Mitsubishi Motors
Toshiba TEC UK Imaging Systems Ltd
Illinois Institute of Technology
MAN Diesel
McDonalds India
Skoda Auto
Bank of Israel
Fujifilm
China Mobile
Santander
Samsung SDI
Skanska
Generali
Telmex
Toyota Tsusho
BECHTEL
Ricoh
BAE SYSTEMS
Federação Portuguesa de Futebol
Credit Agricole
HYUNDAI
Rothschild
Toyota Boshoku
Oriflame Romania
ING
Ikea
Nordea

Partners, certificates & awards