Syntax

Detailed Description

The Import-HpcJobTemplate cmdlet imports a job template from an XML file, and as a result creates a new job template or overwrites an existing job template.

Parameters

-ClusterConnectionString<String[]>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

Replaces an existing template without prompting when the value of the Name parameter matches the name of an existing job template.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name for the imported job template. The maximum length of the name is 50 characters. The value can be any alphanumeric string that is less than the maximum length except "default", which is reserved for the default template. The name can include spaces. To specify a name that includes spaces, enclose the name in double quotation marks (").

This name overrides the value that the Name attribute of the JobTemplate element in the XML file specifies, if the names differ.

If this name matches the name of an existing job template and you do not specify the Force parameter, the Import-HpcJobTemplate cmdlet prompts you to confirm whether you want to replace the existing job template.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

Specifies the name of the XML file from which to import the job template, including the relative or full path if the file is not in the current directory. The file name and path must be valid.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Scheduler<String[]>

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>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

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

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

None

Outputs

The output type is the type of the objects that the cmdlet emits.

HpcJobTemplate

Notes

If you do not save the HpcJobTemplate object that this cmdlet returns in a variable or redirect the object to another cmdlet, Import-HpcJobTemplate displays information about the job templates. This information includes the name and description for the job template and the dates and times in local time that the job template was created and last changed.

Job templates are stored centrally on the head node. When you import a new job template, administrators on the head node have full control, modify, and submit jobs permissions on the job template by default. Local users on the head node have submit permissions on the job template. For information about changing permissions on job templates, see the Get-HpcJobTemplateAcl and Set-HpcJobTemplateAcl cmdlets.

Only administrators on the head node can add new job templates.

You must be a cluster administrator to run this cmdlet successfully.

Examples

Example 1: Import a job template by name

This command imports a new job template named MyNewTemplate from the file at C:\MyTemplates\MyNewTemplate.xml.