Commands › Exchange Online

Get-ExchangeServer

Exchange Online ExchangeOnlineManagement Get-*

View the properties of Exchange servers. When you run the Get-ExchangeServer cmdlet with no parameters, it returns the attributes of all the servers in the Exchange organization. To return specific server properties (including domain controller information) where the Get-ExchangeServer cmdlet has to contact servers directly or perform a complex or slow calculation, make sure you use the Status parameter.

Quick start script

# Get-ExchangeServer — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Get-ExchangeServer -Domain <Fqdn> | Format-List

# 3. Export for evidence / drift tracking
Get-ExchangeServer | Export-Clixml .\ExchangeServer-$(Get-Date -Format yyyyMMdd).xml

Syntax — 2 parameter sets

Domain

Get-ExchangeServer -Domain <Fqdn>
 [-DomainController <Fqdn>]
 [-Status]
 [<CommonParameters>]

Identity

Get-ExchangeServer [[-Identity] <ServerIdParameter>]
 [-DomainController <Fqdn>]
 [-Status]
 [<CommonParameters>]

Parameters (4)

ParameterTypeRequiredWhat it controls
-Identity ServerIdParameter The Identity parameter specifies the Exchange server that you want to view. You can use any value that uniquely identifies the Exchange server. For example:
-Domain Fqdn yes The Domain parameter filters the results by the fully qualified domain name (FQDN) of the domain (for example, contoso.com).
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-Status SwitchParameter The Status switch specifies whether to include additional property values in the results, for example, the Watson state, StaticDomainControllers, and runtime domain controller usage. You don't need to specify a value...

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.