Share via


Get-ServiceFabricNodeTransitionProgress

Gets the progress of a node transition operation.

Syntax

Default (Default)

Get-ServiceFabricNodeTransitionProgress
    -OperationId <Guid>
    [-TimeoutSec <Int32>]
    [<CommonParameters>]

Description

A node transition operation is an operation to start or stop a Service Fabric node. The Get-ServiceFabricNodeTransitionProgress cmdlet gets the progress of a node transition operation that is started by using the Start-ServiceFabricNodeTransition cmdlet. This cmdlet returns an object of type System.Fabric.NodeTransitionProgress. The State property of that object indicates the current state of the operation. For example, state value Running means the operation is in progress. Completed means it finished successfully.

For more information, see Replacing the Start Node and Stop node APIs with the Node Transition API.

Examples

Example 1: Check progress of an operation

PS C:\> $CurrentProgress = Get-ServiceFabricNodeTransitionProgress -OperationId c645433e-a68f-4c8a-8cfb-076d339726a8

PS C:\> $CurrentProgress.State

Running

In the example above, the progress an operation is queried and the result indicates that the operation is in the Running state.

Example 2: Troubleshoot failed operation

PS C:\> $CurrentProgress = Get-ServiceFabricNodeTransitionProgress -OperationId 6f2bedbe-72c7-4d25-891d-4e070e8809a0

PS C:\> $CurrentProgress.State

Faulted

PS C:\> $CurrentProgress.Result.Exception.ErrorCode

InstanceIdMismatch

In the example above, the progress an operation is queried. The result indicates that the operation is in the Faulted state and that the Result.Exception.ErrorCode value is InstanceIdMismatch. This implies that an incorrect NodeInstanceId was provided. Note that until the operation reaches a terminal state, the Result object is $Null.

Parameters

-OperationId

Specify the unique ID used to track an operation. This is the same value that you used to start the operation by using Start-ServiceFabricNodeTransition.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TimeoutSec

Specifies the time-out value, in seconds, for this cmdlet.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

System.Object