Copy-HpcNodeTemplate

Copy-HpcNodeTemplate

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

Syntax

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

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




Detailed Description

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

Parameters

-ClusterConnectionString<String[]>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

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.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NewName<String>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Template<HpcNodeTemplate>

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.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

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

Inputs

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

  • HpcNodeTemplate

Outputs

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

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

Examples

Example 1: Copy a node template

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.


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

Example 2: Copy a node template to a specified file

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


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

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

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.


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

Related topics

Community Additions

ADD
Show: