Commands › Exchange Online

Test-SystemHealth

Exchange Online ExchangeOnlineManagement Test-*

Gather data about your Microsoft Exchange system and to analyze the data according to best practices.

Quick start script

# Test-SystemHealth — 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
Test-SystemHealth | Format-List

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

Syntax

Test-SystemHealth [-ADCredentials <PSCredential>]
 [-Analyze]
 [-Collect]
 [-ConfigurationData <Byte[]>]
 [-ConfigurationFileLocation <LongPath>]
 [-Confirm]
 [-Description <String>]
 [-DomainController <Fqdn>]
 [-DownloadConfigurationUpdates]
 [-ExchangeCredentials <PSCredential>]
 [-Export]
 [-GenerateEvents]
 [-GenerateSQMData]
 [-MaxThreads <Int32>]
 [-MergeFileLocation <LongPath>]
 [-OutData]
 [-OutFileLocation <LongPath>]
 [-Roles <String[]>]
 [-ScanType <String>]
 [-ServerList <String[]>]
 [-Timeout <EnhancedTimeSpan>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (22)

ParameterTypeRequiredWhat it controls
-ADCredentials PSCredential The ADCredentials parameter specifies the username and password that's used to access Active Directory. Typically, you use this parameter in scripts or when you need to provide different credentials that have the...
-Analyze SwitchParameter The Analyze switch enables analysis on the data gathered. You don't need to specify a value with this switch.
-Collect SwitchParameter The Collect switch enables data collection. You don't need to specify a value with this switch.
-ConfigurationData Byte[] This parameter is reserved for internal Microsoft use.
-ConfigurationFileLocation LongPath This parameter is reserved for internal Microsoft use.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-Description String The Description parameter specifies a descriptive label for the scan.
-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...
-DownloadConfigurationUpdates SwitchParameter The DownloadConfigurationUpdates switch checks for and downloads newer versions of the configuration file. You don't need to specify a value with this switch.
-ExchangeCredentials PSCredential The ExchangeCredentials parameter specifies the username and password that's used to access Exchange servers. Typically, you use this parameter in scripts or when you need to provide different credentials that have...
-Export SwitchParameter The Export switch causes sensitive data to be removed from the output file specified. You don't need to specify a value with this switch.
-GenerateEvents SwitchParameter This parameter is reserved for internal Microsoft use.
-GenerateSQMData SwitchParameter This parameter is reserved for internal Microsoft use.
-MaxThreads Int32 This parameter is reserved for internal Microsoft use.
-MergeFileLocation LongPath This parameter is reserved for internal Microsoft use.
-OutData SwitchParameter The OutData switch specifies whether the output data is sent as a byte stream. You don't need to specify a value with this switch.
-OutFileLocation LongPath The OutFileLocation parameter identifies the name and path to the data file to generate.
-Roles String[] This parameter is reserved for internal Microsoft use.
-ScanType String This parameter is reserved for internal Microsoft use.
-ServerList String[] This parameter is reserved for internal Microsoft use.
-Timeout EnhancedTimeSpan The Timeout parameter specifies the number of seconds before the operation times out. The default value is 300 seconds (5 minutes).
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

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