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

Export-HpcJobTemplate

Applies To: Windows HPC Server 2008

Exports the specified job template to an XML file.

Syntax

Export-HpcJobTemplate [-Force] [-Scheduler <string>] -Path <string> [-Name] <string> [<CommonParameters>]

Export-HpcJobTemplate [-Force] [-Scheduler <string>] -Path <string> -Template <HpcJobTemplate> [<CommonParameters>]

Detailed Description

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.

Parameters

-Force

Overwrites the specified XML file without prompting if it already exists.

 

Required?

false

Position?

named

Default Value

not applicable

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name <string>

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.

 

Required?

true

Position?

1

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path <string>

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.

 

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>

 

Required?

false

Position?

named

Default Value

%CCP_SCHEDULER%

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Template <HpcJobTemplate>

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-HpbJobTemplate cmdlet to get an HpcJobTemplate object for the job template.

 

Required?

true

Position?

named

Default Value

no default

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

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

Input and Return Types

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

 

Input Type

An HpcJobTemplate object.

Return Type

None.

Example 1

C:\PS>Export-HpcJobTemplate -Name "My Template" -Path "My Template.xml"

Exports the "My Template" job template to a file named "My Template.xml."

Example 2

C:\PS>$MyTemplate = Get-HpcJobTemplate -Name MyTemplate
Export-HpcJobTemplate -Template $MyTemplate -Path MyTemplate.xml

Gets the HpcJobTemplate object for a job template called MyTemplate, then exports that job template to the MyTemplate.xml file by specifying that HpcJobTemplate object.

Example 3

C:\PS>Get-HpcJobTemplate -Name MyTemplate | Export-HpcJobTemplate -Path MyTemplate.xml

Gets the HpcJobTemplate object for a job template called MyTemplate, then exports that job template to the MyTemplate.xml file by redirecting the object to the Export-HpcJobTemplate cmdlet.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.