When something feels slow, or before any change window, a short and repeatable health check tells you whether your Exchange servers are really fine. Every command below runs in the Exchange Management Shell and only reads data.
1. List your servers and versions
Get-ExchangeServer | Format-Table Name, ServerRole, Edition, AdminDisplayVersion -AutoSize
Check that every server shows the build you expect. A server left behind on an older Cumulative Update is a common source of odd behaviour.
2. Required services
Get-ExchangeServer | ForEach-Object { Test-ServiceHealth -Server $_.Name } |
Where-Object { -not $_.RequiredServicesRunning } |
Format-List Role, ServicesNotRunning
No output means every required service is running.
3. Server component states
Components left Inactive after maintenance are a classic cause of mail not flowing to one server.
Get-ExchangeServer | ForEach-Object {
Get-ServerComponentState -Identity $_.Name | Where-Object State -ne "Active"
} | Format-Table Identity, Component, State -AutoSize
Some components (for example
ForwardSyncDaemonorProvisioningRps) are inactive by design on-premises. Focus onServerWideOffline,HubTransport,FrontendTransportand the protocol proxies.
4. Database copies (DAG)
Get-MailboxDatabaseCopyStatus * |
Sort-Object Name |
Format-Table Name, Status, CopyQueueLength, ReplayQueueLength, ContentIndexState -AutoSize
You want Mounted or Healthy, queue lengths close to zero and a Healthy content index.
5. Transport queues
Get-ExchangeServer | ForEach-Object { Get-Queue -Server $_.Name } |
Where-Object MessageCount -gt 10 |
Format-Table Identity, DeliveryType, Status, MessageCount, NextHopDomain -AutoSize
6. Certificates that expire soon
Get-ExchangeCertificate | Where-Object { $_.NotAfter -lt (Get-Date).AddDays(60) } |
Format-Table Thumbprint, Subject, NotAfter, Services -AutoSize
Go further: HealthChecker
Microsoft's free HealthChecker script from the CSS-Exchange project produces a full HTML report per server (build, .NET, TLS, security settings and more): aka.ms/ExchangeHealthChecker.
Keep the results in OneNote
Paste each run into a dated OneNote page in your Exchange notebook. After a few weeks you have a baseline, and the next time something looks off you can compare against a known good day.
- #exchange-server
- #powershell
- #monitoring
Questions about this article or a project of your own?