Export (0) Print
Expand All
Expand Minimize

Export-HpcJobTemplate

Updated: January 10, 2014

Export-HpcJobTemplate

Exports the specified job template to an XML file.

Syntax

Parameter Set: profile
Export-HpcJobTemplate -Path <String> -Template <HpcJobTemplate> [-Force] [-Scheduler <String> ] [ <CommonParameters>]

Parameter Set: name
Export-HpcJobTemplate [-Name] <String> -Path <String> [-Force] [-Scheduler <String> ] [ <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.


Aliases

none

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.


Aliases

none

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.


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

-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.


Aliases

none

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

Inputs

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

  • An HpcJobTemplate object.

Outputs

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

  • None.

Examples

EXAMPLE 1

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


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

EXAMPLE 2

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.


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

EXAMPLE 3

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.


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

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft