Export-HpcJobTemplate
Exports a job template to an XML file.
Syntax
Export-HpcJobTemplate
-Template <HpcJobTemplate>
-Path <String>
[-Force]
[-ClusterConnectionString <String[]>]
[-Scheduler <String[]>]
[<CommonParameters>]
Export-HpcJobTemplate
[-Name] <String>
-Path <String>
[-Force]
[-ClusterConnectionString <String[]>]
[-Scheduler <String[]>]
[<CommonParameters>]
Description
The Export-HpcJobTemplate cmdlet exports the specified job template to an XML file. You can specify the job template by name or as an HpcJobTemplate object. You can edit the XML file to change settings as needed, and then import it to create a new job template based on the exported job template.
Examples
Example 1: Export a job template
PS C:\>Export-HpcJobTemplate -Name "My Template" -Path "My Template.xml"
This command exports the job template named My Template to a file named My Template.xml.
Example 2: Get a job template and export it
PS C:\>$MyTemplate = Get-HpcJobTemplate -Name "MyTemplate"
PS C:\> Export-HpcJobTemplate -Template $MyTemplate -Path "MyTemplate.xml"
This command gets the HpcJobTemplate object for a job template named MyTemplate, and then exports that job template to the MyTemplate.xml file by specifying that HpcJobTemplate object.
Example 3: Pass a job template and export it
PS C:\>Get-HpcJobTemplate -Name MyTemplate | Export-HpcJobTemplate -Path "MyTemplate.xml"
This command gets the HpcJobTemplate object for a job template named MyTemplate, and then exports that job template to the MyTemplate.xml file by redirecting the object to the Export-HpcJobTemplate cmdlet.
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
Indicates that this operation overwrites the specified XML file without prompting if it already exists.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of the job template that you want to export. The maximum length of the name is 50 characters. You cannot specify both the Name and Template parameters.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Path
Specifies a name for the XML file to which you want to export the job template, including the full or relative path to the file if the Export-HpcJobTemplate cmdlet should not save the file in the current directory.
This cmdlet creates any directories that do not already exist in the path. If the file already exists and you do not specify the Force parameter, the cmdlet prompts you to confirm whether 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 includes the job templates. 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 |
-Template
Specifies the HpcJobTemplate object for the job template that you want to export. You cannot specify both the Name and Template parameters. Use the Get-HpcJobTemplate cmdlet to get an HpcJobTemplate object for the job template.
Type: | HpcJobTemplate |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
HpcJobTemplate
Outputs
None