Reset-​Azure​Batch​Compute​Node

Reinstalls the operating system on the specified compute node.

Syntax

Reset-AzureBatchComputeNode
     [[-ComputeNode] <PSComputeNode>]
     -BatchContext <BatchAccountContext>
     [-ReimageOption <ComputeNodeReimageOption>]
     [<CommonParameters>]
Reset-AzureBatchComputeNode
     [-PoolId] <String>
     [-Id] <String>
     -BatchContext <BatchAccountContext>
     [-ReimageOption <ComputeNodeReimageOption>]
     [<CommonParameters>]

Description

The Reset-AzureBatchComputeNode cmdlet reinstalls the operating system on the specified compute node.

Examples

Example 1: Reimage a node

PS C:\>Reset-AzureBatchComputeNode -PoolId "MyPool" -Id "tvm-3257026573_2-20150813t200938z" -BatchContext $Context

This command reimages the compute node with ID "tvm-3257026573_2-20150813t200938z" in the pool named MyPool. Use the Get-AzureRmBatchAccountKeys cmdlet to assign a context to the $Context variable.

Example 2: Reimage all nodes in a pool

PS C:\>Get-AzureBatchComputeNode -PoolId "MyPool" -BatchContext $Context | Reset-AzureBatchComputeNode -BatchContext $Context

This command reimages every compute node in the pool named MyPool.

Required Parameters

-BatchContext

Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. To obtain a BatchAccountContext object that contains access keys for your subscription, use the Get-AzureRmBatchAccountKeys cmdlet.

Type:BatchAccountContext
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Id

Specifies the ID of the compute node to reimage.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PoolId

Specifies the ID of the pool that contains the compute node.

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-ComputeNode

Specifies the PSComputeNode object that represents the compute node to reimage.

Type:PSComputeNode
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-ReimageOption

Specifies when to reimage the node and what to do with currently running tasks. The default is Requeue.

Type:ComputeNodeReimageOption
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False