Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Import-HpcJobTemplate

Updated: January 10, 2014

Import-HpcJobTemplate

Imports a job template from an XML file.

Syntax

Parameter Set: Default
Import-HpcJobTemplate -Name <String> -Path <String> [-Force] [-Scheduler <String> ] [ <CommonParameters>]




Detailed Description

Imports a job template from an XML file, and as a result creates a new job template or overwrites an existing job template.

Parameters

-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

not applicable

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

no default

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

no default

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

%CCP_SCHEDULER%

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. 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.

  • An HpcJobTemplate object.

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

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


PS C:\>Import-HpcJobTemplate -Name MyNewTemplate -Path C:\MyTemplates\MyNewTemplate.xml

EXAMPLE 2

Replaces an existing job template named MyExistingTemplate by importing the new job template settings from the file at C:\MyTemplates\MyExistingTemplate_revised.xml.


PS C:\>Import-HpcJobTemplate -Name MyExistingTemplate -Path C:\MyTemplates\MyExistingTemplate_revised.xml -Force

Related topics

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.