Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Assign-HpcNodeTemplate

Applies To: Windows HPC Server 2008

Assigns or reapplies a node template to one or more specified compute nodes. As a result, the cmdlet rebuilds the compute nodes with the information from the node template.

Syntax

Assign-HpcNodeTemplate [-Async] [-Comment <string>] [-PassThru <SwtichParameter>] [-Scheduler <string>] -Maintain -Node <HPCNode[]> [-confirm] [-whatif] [<CommonParameters>]

Assign-HpcNodeTemplate [-Async] [-Comment <string>] [-PassThru <SwtichParameter>] [-Scheduler <string>] -Maintain -NodeName <string[]> [-confirm] [-whatif] [<CommonParameters>]

Assign-HpcNodeTemplate [-Async] [-Comment <string>] [-PassThru <SwtichParameter>] [-Rebuild] [-Scheduler <string>] [-Template <HPCNodeTemplate>] [[-Name] <string>] -NodeName <string[]> [-confirm] [-whatif] [<CommonParameters>]

Assign-HpcNodeTemplate [-Async] [-Comment <string>] [-PassThru <SwtichParameter>] [-Rebuild] [-Scheduler <string>] [-Template <HPCNodeTemplate>] [[-Name] <string>] -Node <HPCNode[]> [-confirm] [-whatif] [<CommonParameters>]

Detailed Description

Assigns or reapplies a node template to one or more specified compute nodes. This cmdlet is equivalent to the clicking a node and then clicking Assign Node Template in HPC Cluster Manager.

Parameters

-Async

Applies or reapplies the node template asynchronously. The cmdlet exits without waiting for the nodes to finish provisioning.

If you specify the Async parameter, the PassThru parameter has no effect. Also, the return type is an HpcWorkItem object when you specify Async. You can use this HpcWorkItem object to track the status of the updates to the nodes.

 

Required?

false

Position?

named

Default Value

not applicable

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Comment <string>

Specifies a comment to use when the cmdlet reimages the node. The comment appears in the Comments column of the operations lists that are available in HPC cluster manager.

The comment is not used if the other parameters for the cmdlet indicate that the cmdlet should not reimage the node. For example, the comment is not used if you specify the Maintain parameter.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Maintain

Updates the specified nodes by incrementally reapplying the Maintain section of the node templates that are already associated with the nodes. Specifying this parameter is equivalent to clicking the node and clicking Maintain in HPC Cluster Manager. You cannot specify the Maintain parameter if you also specify any of the following parameters: Name, Template, or Rebuild.

 

Required?

true

Position?

named

Default Value

not applicable

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name <string>

Specifies the name of the node template to apply to the specified nodes. You cannot specify the Name parameter if you also specify either the Template or the Maintain parameter.

 

Required?

false

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 compute nodes to which you want to assign or reapply the node templates. Use the Get-HpcNode cmdlet to get the HpcNode objects for the nodes. You cannot specify both the Node and NodeName parameters.

 

Required?

true

Position?

named

Default Value

no default

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-NodeName <string[]>

Specifies a list of the names of one or more compute nodes to which you want to assign or reapply the node templates. You cannot specify both the NodeName and Node parameters.

 

Required?

true

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

true

-PassThru <SwtichParameter>

Causes the cmdlet to return the HpcNode objects for the specified nodes after the cmdlet applies the node templates to the nodes, and displays information about those nodes if you do not redirect the output of the cmdlet to another cmdlet or save the output in a variable.

The PassThru parameter has no effect if you also specify the Async parameter. In that case, the cmdlet behaves as though you only specified the Async parameter. If you specify the PassThru parameter and do not specify the Async parameter, the return type for the cmdlet consists of one or more HpcNode objects.

 

Required?

false

Position?

named

Default Value

not applicable

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Rebuild

Rebuilds the operating system of the specified nodes by using the operating system image specified in the operating system reinstallation steps in the node template. When you specify the Rebuild parameter, the Assign-HpcNodeTemplate cmdlet applies all of the steps in the node template, and not just the steps in the Maintain section of the node template. When you specify the Rebuild parameter, the node template must contain the steps to reinstall an operating system image. You cannot specify both the Rebuild and the Maintain parameters.

 

Required?

false

Position?

named

Default Value

not applicable

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 nodes and node templates. 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

-Template <HPCNodeTemplate>

Specifies an HpcNodeTemplate object for the node template that you want to apply to the specified nodes. Use the Get-HpcNodeTemplate cmdlet to get the HpcNodeTemplate object for a node template. You cannot specify the Template parameter if you also specify either the Name or the Maintain parameter.

 

Required?

false

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

None, except as described for the Async and PassThru parameters.

Notes

The specified nodes must be in the offline state before you can assign or reapply node templates to the nodes. If you reassign the node template that is already associated with the node to the node by explicitly specifying the node template with the Name or Template parameter, the Assign-HpcNodeTemplate behaves the same as if you specified the Rebuild parameter without specifying a node template.

Example 1

C:\PS>Get-HpcNode -State Unknown | Assign-HpcNodeTemplate -Name DefaultNodeTemplate

Applies a node template named DefaultNodeTemplate to all of the nodes in the unknown state.

Example 2

C:\PS>$w = Get-HpcNode -State Unknown | Assign-HpcNodeTemplate -Name DefaultNodeTemplate -Async
Get-HpcOperation -WorkItem $w

Applies a node template named DefaultNodeTemplate asynchronously to all of the nodes in the unknown state. This example returns an operation work item that you can subsequently use to track the status of the operation.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.