Export-HpcJob
Saves information about a job in an XML file.
Syntax
Export-HpcJob
-Job <HpcJob>
-Path <String>
[-Force]
[-ClusterConnectionString <String[]>]
[-Scheduler <String[]>]
[<CommonParameters>]
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.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Replaces the job XML file if it already exists, without prompting the user.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Id
Specifies the identifier of the job that you want to export. You cannot use the Id parameter together with the Job parameter.
Type: | Int32 |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | 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.
Type: | HpcJob |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | 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.
Type: | String |
Position: | Named |
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 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\>
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
HpcJob
Outputs
None