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

Remove-HpcJobTemplate

Deletes a job template from the specified cluster.

Syntax

Remove-HpcJobTemplate [-Scheduler <string>] -Name <string> [<CommonParameters>]

Remove-HpcJobTemplate [-Scheduler <string>] -Template <HpcJobTemplate> [<CommonParameters>]

Detailed Description

Deletes a job template from the specified cluster. You can specify the job template that you want to delete either by name or by passing an HpcJobTemplate object to the Remove-JobTemplate cmdlet.

Parameters

-Name <string>

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

 

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 you want to delete. 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.

Notes

You cannot delete the default job template. Only cluster administrators can delete job templates. If a job in the queued or running state uses the template, an error occurs and the cmdlet does not delete the template.

Example 1

C:\PS>Remove-HpcJobTemplate -Name "Template 2"

Deletes the job template named Template 2.

Example 2

C:\PS>Get-HpcJobTemplate -Name MyExtraTemplate | Remove-HpcJobTemplate

Gets the HpcJobTemplate object for a job template called MyExtraTemplate, then deletes that job template by redirecting the object to the Remove-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.