Share via


Complete-ServiceFabricRepairTask

Reports that a manual repair task is finished.

Syntax

Default (Default)

Complete-ServiceFabricRepairTask
    [-TaskId] <String>
    [[-Version] <Int64>]
    [-ResultStatus <RepairTaskResult>]
    [-ResultCode <Int32>]
    [-ResultDetails <String>]
    [-Force]
    [-TimeoutSec <Int32>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Complete-ServiceFabricRepairTask cmdlet reports that a manual Service Fabric repair task is finished. After you run this cmdlet, the repair task is no longer approved to be run. No additional repair work is started on the entities described by the repair task. If you are unsure of the status of the repair work, do not report completion of the repair task. Performing repair work after you run this cmdlet can result in availability or data loss. If subsequent repairs are needed, start a new repair task and wait for approval of that repair task.

This cmdlet supports the Service Fabric platform. Do not run this cmdlet directly.

This cmdlet requires that you connect to the cluster with credentials that are granted administrator access to the cluster. Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.

Examples

Example 1: Complete a manual repair task successfully

PS C:\> Complete-ServiceFabricRepairTask -TaskId MyRepairTaskID

This command marks the manual repair task that has the ID MyRepairTaskId as completed successfully.

Example 2: Complete a manual repair task with details

PS C:\> Complete-ServiceFabricRepairTask -TaskId MyRepairTaskID -ResultStatus Cancelled -ResultCode 42 -ResultDetails "Repair was no longer needed"

This command marks the manual repair task that has the ID MyRepairTaskId as cancelled and includes additional details.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

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

-Force

Forces the command to run even if the specified repair task does not appear to be a manual repair task.

Parameter properties

Type:SwitchParameter
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

-ResultCode

Specifies a value that provides additional details about the result of the repair task.

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

-ResultDetails

Specifies a string that provide additional details about the result of the repair task.

Parameter properties

Type:String
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

-ResultStatus

Specifies a value that describes the overall result of the repair task. Valid values are:

  • Invalid. Do not specify this value.
  • Succeeded. The repair task succeeded.
  • Cancelled. The repair task was cancelled.
  • Interrupted. The repair task was interrupted.
  • Failed. The repair task failed.
  • Pending. Do not specify this value.

Parameter properties

Type:RepairTaskResult
Default value:None
Accepted values:Invalid, Succeeded, Cancelled, Interrupted, Failed, Pending
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

-TaskId

Specifies the ID of the repair task to complete.

Parameter properties

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

Parameter sets

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

-TimeoutSec

Specifies the time-out period, in seconds, for the operation.

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

-Version

Specifies the current version of the repair task. The request can succeed only if the value that this parameter specifies matches the current value of the repair task. Specify a value of zero (0) to skip version check.

Parameter properties

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

Parameter sets

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

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

System.String

System.Int64

Outputs

System.Object