Commands › Exchange Online
Get-ExchangeServer
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)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.