Export-HpcTestResult

Exports the test results for the specified diagnostic test run to the specified directory.

Syntax

Export-HpcTestResult
      [-RunId] <Int32>
      [-Path <String>]
      [-Force]
      [-ClusterConnectionString <String[]>]
      [-Scheduler <String[]>]
      [<CommonParameters>]
Export-HpcTestResult
      -Run <HpcTestResult>
      [-Path <String>]
      [-Force]
      [-ClusterConnectionString <String[]>]
      [-Scheduler <String[]>]
      [<CommonParameters>]

Description

The Export-HpcTestResult cmdlet exports the test results for the specified diagnostic test run to the specified directory. You can specify the diagnostic test run for which you want to export the test results by specifying the identifier for the test run or the HpcTestResult object for the test run.

The test results can consist of several files, including a Poststep.result file that concatenates the standard output and standard error streams from all of the nodes in the diagnostic test; a PostStepResult.xml file that contains the results of the diagnostic test, which is structured according to the Diagnostic Test Step Result XML Schema; and a Report.html file that contains the results of the diagnostic test that is formatted as an HTML page that HPC Cluster Manager displays on the Result tab for the test results.

Examples

Example 1: Export test results by ID

PS C:\>Export-HpcTestResult -RunId 9 -Path "C:\TestResults\Run9"

This command exports the test results of the test run with an ID of 9 to the C:\TestResults\Run9 directory.

Example 2: Export failed test results

PS C:\>Export-HpcTestResult -Run (Get-HpcTestResult -Alias "ping" -Result Failure | Select-Object -Last 1) -Path "C:\TestResults\LastPingTestFailure"

This command exports the test results for the last failed run of the ping test to the C:\TestResults\LastPingTestFailure directory.

Parameters

-ClusterConnectionString

Specifies an array of cluster connection strings for the cluster to which you want to add the device drivers. The value format is host1,host2,host3. If you do not specify the ClusterConnectionString parameter, this cmdlet uses the connection string on the head node that the CCP_CONNECTIONSTRING environment variable specifies. To set this environment variable, run the following cmdlet: Set-Content Env: CCP_CONNECTIONSTRING \<head_node_name\>.

This parameter was introduced in HPC Pack 2016.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

This parameter is deprecated. Use -Confirm:$False instead.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Path

Specifies the directory to which you want to export the test results, including the full or relative path to the directory if the Export-HpcTestResult cmdlet should not save the test results in a subdirectory in the current directory.

This cmdlet creates directories that do not already exist in the path. If the directory already exists and you do not specify the Force parameter, the cmdlet prompts you to confirm whether you want to replace the contents of the directory.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Run

Specifies the test run for which you want to export the results. To get the HpcTestResult object for a test run, use the Get-HpcTestResult cmdlet. You cannot specify both the Run and RunId parameters.

This parameter was named TestResult prior to HPC Pack 2008 R2.

Type:HpcTestResult
Aliases:TestResult
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-RunId

Specifies the identifier of the test run for which you want to export the results. To view the test runs for the HPC cluster, use the Get-HpcTestResult cmdlet. You cannot specify both the RunId and Run parameters.

This parameter was introduced in HPC Pack 2008 R2. It is not supported in previous versions.

Type:Int32
Aliases:Id
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Scheduler

Specifies the host name or IP address of the head node for the cluster that includes the test results that you want to export. The value must be a valid computer name or IP address. If you do not specify the Scheduler parameter, this cmdlet uses the scheduler on the head node that the CCP_SCHEDULER environment variable specifies. To set this environment variable, run the following cmdlet:

Set-Content Env:CCP_SCHEDULER \<head_node_name\>

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

HpcTestResult

Outputs

None

Notes

  • The Export-HpcTestResult cmdlet can only export one set of test results at a time. If you get more than one test run when you run the Get-HpcTestResult cmdlet and then redirect the multiple HpcTestResult objects to the Export-HpcTestResult cmdlet, the Export-HpcTestResult cmdlet overwrites the test results files each time that the Export-HpcTestResult cmdlet processes a new HpcTestResult object.
  • The Export-HpcTestResult cmdlet exports a Poststep.result file only when the PostStep phase of the diagnostic test sends text to standard output or standard error.
  • Before HPC Pack 2008 R2, this cmdlet exported a single HTML file.
  • You must be a cluster administrator to run this cmdlet successfully.