Share via


Export-HpcJob

Saves information about a job in an XML file.

Syntax

job (Default)

Export-HpcJob
    -Job <HpcJob>
    -Path <String>
    [-Force]
    [-ClusterConnectionString <String[]>]
    [-Scheduler <String[]>]
    [<CommonParameters>]

id

Export-HpcJob
    [-Id] <Int32>
    -Path <String>
    [-Force]
    [-ClusterConnectionString <String[]>]
    [-Scheduler <String[]>]
    [<CommonParameters>]

Description

The Export-HpcJob cmdlet exports the specified job to an XML file. You can then import the file by specifying the file in the JobFile parameter of the New-HpcJob cmdlet to create a new job based on the exported job.

Examples

Example 1: Get a job and export it

PS C:\>Get-HpcJob -Id 8 | Export-HpcJob -Path "Job8.xml"

This command exports the job with an ID of 8 to a file named Job8.xml.

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.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Replaces the job XML file if it already exists, without prompting the user.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Id

Specifies the identifier of the job that you want to export. You cannot use the Id parameter together with the Job parameter.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

id
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Job

Specifies an HpcJob object that corresponds to the job that you want to export. To get an HpcJob object, use the Get-HpcJob command. You cannot use the Job parameter together with the Id parameter.

Parameter properties

Type:HpcJob
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

job
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Path

Specifies a name for the XML file to which you want to export the job, including the full or relative path to the file if the Export-HpcJob cmdlet should not save the file in the current directory.

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Scheduler

Specifies the host name or IP address of the head node for the cluster that contains the job 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\>

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

HpcJob

Outputs

None