Export (0) Print
Expand All

Set-HpcNodeState

Sets the state of one or more nodes to online, offline, or rejected.

Syntax

Set-HpcNodeState [-Force] [-Scheduler <string>] -State <string> [-Name] <string[]> [-confirm] [-whatif] [<CommonParameters>]

Set-HpcNodeState [-Scheduler <string>] -Node <HPCNode[]> -State <string> [-confirm] [-whatif] [<CommonParameters>]

Detailed Description

Sets the state of one or more nodes to online, offline, or rejected.

Parameters

-Force

Forces the node to go offline without going into the draining state first. You can only use this parameter when you specify Offline for the State parameter.

 

Required?

false

Position?

named

Default Value

not applicable

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name <string[]>

Specifies a list of the names of the nodes for which you want to change the state. You cannot specify both the Name and Node parameters.

 

Required?

true

Position?

1

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

true

-Node <HPCNode[]>

Specifies a list of one or more HpcNode objects for the nodes for which you want to change the state. Use the Get-HpcNode cmdlet to get the HpcNode object for a node. You cannot specify both the Node and Name parameters.

 

Required?

true

Position?

named

Default Value

no default

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Scheduler <string>

Specifies the host name or IP address of the head node for the cluster that includes the nodes. 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

-State <string>

Specifies the new state you want to assign to the nodes. The possible states you can specify are Online, Offline, and Rejected.

 

Required?

true

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.

 

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

 

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

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

One or more HpcNode objects.

Return Type

One or more HpcNode objects.

Notes

If you set the state of a node to offline, the node can take a long time to go offline if jobs are running on the node. If any of the jobs have the Run until canceled property set, the operation to take the node offline does not return. Cancel such jobs before you set the state of the node to offline.

Example 1

C:\PS>Set-HpcNodeState -Name MyNode -State Online

Sets the state of the node named MyNode to online.

Example 2

C:\PS>Set-HpcNodeState -Name MyNode2 -State Offline

Forces the node named MyNode2 into the offline state, without going into the draining state first.

Example 3

C:\PS>Get-HpcNode -GroupName MyTestNodes | Set-HpcNodeState -State Offline

Gets the HpcNode objects for the nodes in the node group named MyTestNodes, and sets the state for those nodes to offline.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft