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

Copy-HpcJobTemplate

Updated: January 10, 2014

Copy-HpcJobTemplate

Copies a job template.

Syntax

Parameter Set: profile
Copy-HpcJobTemplate -NewName <String> -Template <HpcJobTemplate> [-Scheduler <String> ] [ <CommonParameters>]

Parameter Set: name
Copy-HpcJobTemplate [-Name] <String> -NewName <String> [-Scheduler <String> ] [ <CommonParameters>]




Detailed Description

Creates a new job template by copying an existing job template. You can use the name of the existing job template or use an HpcJobTemplate object to specify the job template that you want to copy.

Parameters

-Name<String>

Specifies the name of the job the template that you want to copy. The maximum length for the name is 50 characters. You cannot specify both the Name and the Template parameters.


Aliases

none

Required?

true

Position?

1

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NewName<String>

Specifies the name to use for the new job template. The maximum length for the name is 50 characters. The name 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 (").

You cannot use the Copy-HpcJobTemplate cmdlet to overwrite an existing job template, so an error occurs if you specify the name of an existing job template for the NewName parameter.


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 an HpcJobTemplate object for the job template that you want to copy. Use the Get-HpcJobTemplate cmdlet to get an HpcJobTemplate object for a job template. You cannot specify both the Template and the Name parameters.

This parameter was introduced in Windows HPC Server 2008 R2 and is not supported in previous versions.


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

Notes

  • To view the names of existing job templates that you might want to copy, run the Get-HpcJobTemplate cmdlet without specifying a value for the Name parameter.

  • Only administrators on the head node can create new job templates.

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

Examples

EXAMPLE 1

Creates a new job template called NewTemplate by copying the existing OriginalTemplate job template.


PS C:\>Copy-HpcJobTemplate -Name OriginalTemplate -NewName NewTemplate

EXAMPLE 2

Gets an HpcJobTemplate object for the Default job template, and then redirects that object to the Copy-HpcJobTemplate cmdlet to create a new job template called NewTemplate2 by copying the Default job template.


PS C:\>Get-HpcJobTemplate -Name Default | Copy-HpcJobTemplate -NewName NewTemplate2

Related topics

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