Add-HpcGroup

Add-HpcGroup

Adds nodes to node groups.

Syntax

Parameter Set: Name-NodeName
Add-HpcGroup [-Name] <String[]> -NodeName <String[]> [-ClusterConnectionString <String[]> ] [-Scheduler <String[]> ] [ <CommonParameters>]

Parameter Set: Id-Node
Add-HpcGroup [-Id] <Int32[]> -Node <HpcNode[]> [-ClusterConnectionString <String[]> ] [-Scheduler <String[]> ] [ <CommonParameters>]

Parameter Set: Id-NodeName
Add-HpcGroup [-Id] <Int32[]> -NodeName <String[]> [-ClusterConnectionString <String[]> ] [-Scheduler <String[]> ] [ <CommonParameters>]

Parameter Set: Name-Node
Add-HpcGroup [-Name] <String[]> -Node <HpcNode[]> [-ClusterConnectionString <String[]> ] [-Scheduler <String[]> ] [ <CommonParameters>]




Detailed Description

The Add-HpcGroup cmdlet adds a specified list of one or more nodes to one or more specified node groups. You can specify the node groups by name or by identifier. You can specify the nodes either by name or by using HpcNode objects that you get with the Get-HpcNode cmdlet.

Parameters

-ClusterConnectionString<String[]>

Specifies an array of cluster connection strings for the cluster on which you perform the operation. 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

-Id<Int32[]>

Specifies an array of node group identifiers for the node groups to which you want to add the nodes. Use the Get-HpcGroup cmdlet to view a list of node groups for the cluster that includes their identifiers. You cannot specify both the Id and Name parameters.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String[]>

Specifies an array of names for the node groups to which you want to add the nodes. Use the Get-HpcGroup cmdlet to view a list of node groups for the cluster that includes their names. You cannot specify both the Name and Id parameters. The maximum length for the name of a node group is 64 characters.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Node<HpcNode[]>

Specifies an array of HpcNode objects for the nodes that you want to add to the node groups. Use the Get-HpcNode cmdlet to get HpcNode objects for the nodes. You cannot specify both the Node and NodeName parameters.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-NodeName<String[]>

Specifies an array of names for the nodes that you want to add to the node groups. You cannot specify both the NodeName and Node parameters. This parameter is a filter parameter, so you do not receive an error for specifying a node the does not exist in the HPC cluster as long as you specify at least one node that does exist.


Aliases

none

Required?

true

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

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

  • HpcNode[]

Outputs

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

  • None

Notes

  • Use this cmdlet to add nodes to a node group after you create the node group by using the New-HpcGroup cmdlet.

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

Examples

Example 1: Add a node to a node group

This command adds the node named ComputeNode1 to the node group named MyNodeGroup.


PS C:\> Add-HpcGroup -Name "MyNodeGroup" -NodeName "ComputeNode1"

Example 2: Add a node by name and ID to a node group

This command adds the node named ComputeNode02 to the node group with a node group identifier of 8.


PS C:\> Add-HpcGroup -Id 8 -NodeName "ComputeNode02"

Example 3: Get a node and add it to a group

This command gets an HpcNode object for the node named ComputeNode03, and then adds that node to the node group named MyNodeGroup.


PS C:\> Get-HpcNode -Name "ComputeNode03" | Add-HpcGroup -Name "MyNodeGroup"

Example 4: Add multiple nodes to multiple groups

This command adds the nodes named ComputeNode04 and ComputeNode05 to the node groups named NodeGroup01 and NodeGroup02.


PS C:\> Add-HpcGroup -Name "NodeGroup01,NodeGroup02" -NodeName "ComputeNode04,ComputeNode05"

Related topics

Community Additions

ADD
Show: