Share via


Copy-HpcNodeTemplate

Creates a node template by making a copy of an existing node template.

Syntax

Name (Default)

Copy-HpcNodeTemplate
    [-Name] <String>
    [-NewName <String>]
    [-ClusterConnectionString <String[]>]
    [-Scheduler <String[]>]
    [<CommonParameters>]

Template

Copy-HpcNodeTemplate
    -Template <HpcNodeTemplate>
    [-NewName <String>]
    [-ClusterConnectionString <String[]>]
    [-Scheduler <String[]>]
    [<CommonParameters>]

Description

The Copy-HpcNodeTemplate cmdlet creates a node template by making a copy of an existing node template.

Examples

Example 1: Copy a node template

PS C:\>Copy-HpcNodeTemplate -Name "MyTemplate"

This command creates a node template as a copy of the existing node template named MyTemplate. The new node template has a name of Copy of MyTemplate by default.

Example 2: Copy a node template to a specified file

PS C:\>Copy-HpcNodeTemplate -Name "MyExistingTemplate" -NewName "MyNewTemplate"

This command creates a node template named MyNewTemplate as a copy of the existing node template named MyExistingTemplate.

Example 3: Get a node template and make a copy of it

PS C:\>Get-HpcNodeTemplate -Name "MyExistingTemplate" | Copy-HpcNodeTemplate -NewName "MyNewTemplate"

This command gets an HpcNodeTemplate object for the node template named MyExistingTemplate, and then creates a new node template named MyNewTemplate as a copy of that existing node template.

Parameters

-ClusterConnectionString

Specifies an array of cluster connection strings for the cluster to which you want to add the device drivers. The value format is host1,host2,host3. If you do not specify the ClusterConnectionString parameter, this cmdlet uses the connection string on the head node that the CCP_CONNECTIONSTRING environment variable specifies. To set this environment variable, run the following cmdlet: Set-Content Env: CCP_CONNECTIONSTRING \<head_node_name\>.

This parameter was introduced in HPC Pack 2016.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of the existing node template that you want to copy. You cannot specify both the Name and Template parameters. Use the Get-HpcNodeTemplate cmdlet to view the names of existing node templates.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Name
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NewName

Specifies a name for the new node template that the Copy-HpcNodeTemplate cmdlet creates. If you do not specify a name for the new node template, the cmdlet uses "Copy of " followed by the name of the node template you want to copy as the name of new node template. If a node template with that name already exists, the Copy-HpcNodeTemplate cmdlet tries the names Copy of <original_template_name> (2), Copy of <original_template_name> (3),... until the cmdlet finds a name that no other node template uses.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Scheduler

Specifies the host name or IP address of the head node for the cluster that includes the node template you want to copy. 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\>

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Template

Specifies an HpcNodeTemplate object for the node template that you want to copy. Use the Get-HpcNodeTemplate cmdlet to get an HpcNodeTemplate object for a node template. You cannot specify both the Template and Name parameters.

Parameter properties

Type:HpcNodeTemplate
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Template
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

HpcNodeTemplate

Outputs

HpcNodeTemplate

Notes

  • You can specify the node template that you want to copy by name or by using an HpcNodeTemplate object.
  • You must be a cluster administrator to run this cmdlet successfully.