Test-SystemHealth
Applies to: Exchange Server 2013 Preview
Topic Last Modified: 2012-07-12
Use the Test-SystemHealth cmdlet to gather data about your Microsoft Exchange system and to analyze the data according to best practices.
For information about the parameter sets in the Syntax section below, see Parameters.
Test-SystemHealth [-ADCredentials <PSCredential>] [-Analyze <SwitchParameter>] [-Collect <SwitchParameter>] [-ConfigurationData <Byte[]>] [-ConfigurationFileLocation <LongPath>] [-Confirm [<SwitchParameter>]] [-Description <String>] [-DomainController <Fqdn>] [-DownloadConfigurationUpdates <SwitchParameter>] [-ExchangeCredentials <PSCredential>] [-Export <SwitchParameter>] [-GenerateEvents <SwitchParameter>] [-GenerateSQMData <SwitchParameter>] [-MaxThreads <Int32>] [-MergeFileLocation <LongPath>] [-OutData <SwitchParameter>] [-OutFileLocation <LongPath>] [-Roles <String[]>] [-ScanType <String>] [-ServerList <String[]>] [-Timeout <EnhancedTimeSpan>] [-WhatIf [<SwitchParameter>]]
This example gathers data about your Exchange system.
Test-SystemHealth
This example saves the output data as a byte stream to the temporary variable $temp. The content is written to the file SystemHealthOutData.xml using the Set-Content cmdlet.
$temp=Test-SystemHealth -OutData Set-Content -Value $temp.FileData -Path d:\temp\SystemHealthOutData.xml -Encoding Byte
You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Test system health" entry in the Exchange and Shell Infrastructure Permissions topic.
| Parameter | Required | Type | Description |
|---|---|---|---|
|
ADCredentials |
Optional |
System.Management.Automation.PSCredential |
The ADCredentials parameter specifies the credentials used to access Active Directory. The default value is the current user's credentials. This parameter requires the creation and passing of a credential object. This credential object is created by using the Get-Credential cmdlet. For more information, see Get-Credential. |
|
Analyze |
Optional |
System.Management.Automation.SwitchParameter |
The Analyze parameter specifies whether to enable analysis on the data gathered. A value of |
|
Collect |
Optional |
System.Management.Automation.SwitchParameter |
The Collect parameter specifies whether to enable data collection. A value of |
|
ConfigurationData |
Optional |
System.Byte[] |
This parameter is reserved for internal Microsoft use. |
|
ConfigurationFileLocation |
Optional |
Microsoft.Exchange.Data.LongPath |
This parameter is reserved for internal Microsoft use. |
|
Confirm |
Optional |
System.Management.Automation.SwitchParameter |
The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch. |
|
Description |
Optional |
System.String |
The Description parameter specifies a descriptive label for the scan. |
|
DomainController |
Optional |
Microsoft.Exchange.Data.Fqdn |
The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory. |
|
DownloadConfigurationUpdates |
Optional |
System.Management.Automation.SwitchParameter |
The DownloadConfigurationUpdates parameter checks for and downloads newer versions of the configuration file. The default value is |
|
ExchangeCredentials |
Optional |
System.Management.Automation.PSCredential |
The ExchangeCredentials parameter identifies the credentials to apply for accessing servers running Exchange. This parameter requires the creation and passing of a credential object. This credential object is created by using the Get-Credential cmdlet. For more information, see Get-Credential. |
|
Export |
Optional |
System.Management.Automation.SwitchParameter |
The Export parameter causes sensitive data to be removed from the output file specified. A value of |
|
GenerateEvents |
Optional |
System.Management.Automation.SwitchParameter |
This parameter is reserved for internal Microsoft use. |
|
GenerateSQMData |
Optional |
System.Management.Automation.SwitchParameter |
This parameter is reserved for internal Microsoft use. |
|
MaxThreads |
Optional |
System.Int32 |
This parameter is reserved for internal Microsoft use. |
|
MergeFileLocation |
Optional |
Microsoft.Exchange.Data.LongPath |
This parameter is reserved for internal Microsoft use. |
|
OutData |
Optional |
System.Management.Automation.SwitchParameter |
The OutData switch specifies whether the output data is sent as a byte stream. For example, if you run |
|
OutFileLocation |
Optional |
Microsoft.Exchange.Data.LongPath |
The OutFileLocation parameter specifies the name and path to the data file to generate. |
|
Roles |
Optional |
System.String[] |
This parameter is reserved for internal Microsoft use. |
|
ScanType |
Optional |
System.String |
This parameter is reserved for internal Microsoft use. |
|
ServerList |
Optional |
System.String[] |
This parameter is reserved for internal Microsoft use. |
|
Timeout |
Optional |
Microsoft.Exchange.Data.EnhancedTimeSpan |
The Timeout parameter specifies the number of seconds before the operation times out. The default value is 300 seconds (5 minutes). |
|
WhatIf |
Optional |
System.Management.Automation.SwitchParameter |
The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch. |
To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.
To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.
