Add-HpcGroup
Adds nodes to node groups.
Syntax
Add-HpcGroup
[-Name] <String[]>
-NodeName <String[]>
[-ClusterConnectionString <String[]>]
[-Scheduler <String[]>]
[<CommonParameters>]
Add-HpcGroup
[-Name] <String[]>
-Node <HpcNode[]>
[-ClusterConnectionString <String[]>]
[-Scheduler <String[]>]
[<CommonParameters>]
Add-HpcGroup
[-Id] <Int32[]>
-Node <HpcNode[]>
[-ClusterConnectionString <String[]>]
[-Scheduler <String[]>]
[<CommonParameters>]
Add-HpcGroup
[-Id] <Int32[]>
-NodeName <String[]>
[-ClusterConnectionString <String[]>]
[-Scheduler <String[]>]
[<CommonParameters>]
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.
Examples
Example 1: Add a node to a node group
PS C:\>Add-HpcGroup -Name "MyNodeGroup" -NodeName "ComputeNode1"
This command adds the node named ComputeNode1 to the node group named MyNodeGroup.
Example 2: Add a node by name and ID to a node group
PS C:\>Add-HpcGroup -Id 8 -NodeName "ComputeNode02"
This command adds the node named ComputeNode02 to the node group with a node group identifier of 8.
Example 3: Get a node and add it to a group
PS C:\>Get-HpcNode -Name "ComputeNode03" | Add-HpcGroup -Name "MyNodeGroup"
This command gets an HpcNode object for the node named ComputeNode03, and then adds that node to the node group named MyNodeGroup.
Example 4: Add multiple nodes to multiple groups
PS C:\>Add-HpcGroup -Name "NodeGroup01,NodeGroup02" -NodeName "ComputeNode04,ComputeNode05"
This command adds the nodes named ComputeNode04 and ComputeNode05 to the node groups named NodeGroup01 and NodeGroup02.
Parameters
-ClusterConnectionString
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.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Id
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.
Type: | Int32[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
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.
Type: | String[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Node
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.
Type: | HpcNode[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-NodeName
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.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Scheduler
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\>
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
HpcNode[]
Outputs
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.