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 your Exchange Server exact build version number.

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 can get a list of all your Exchange Servers execute the below PowerShell cmdlet in your ems Exchange Management Shell:

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

The above command will produce a tailored list of all Exchange Servers in your environment with their names, roles, edition and version 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 in different versions, e.g. Exchange 2010 + Exchange 2013, the above mentioned cmdlet will display proper results only when executed in ems Exchange Management Shell of the newer Exchange Server.

Be aware that if the above cmdlet is executed on Exchange Server 2016 CU2 (build 466.34) or newer, serverrole property will not display info on CAS roles installed, this is by design. In that case, see if IsClientAccessServer property returns true (which means this 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,
see CAS role missing in serverrole property but IsClientAccessServer returning true.

Exchange 2007 and 2010

To can get a list of all your Exchange Servers execute the below PowerShell cmdlet in your ems Exchange Management Shell:

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

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

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

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

or aliases-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-06-24
  • 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