Approve-ServiceFabricRepairTask

Forces approval of a repair task.

Syntax

Approve-ServiceFabricRepairTask
       [-TaskId] <String>
       [[-Version] <Int64>]
       [-Force]
       [-TimeoutSec <Int32>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

The Approve-ServiceFabricRepairTask cmdlet forces the approval of a Service Fabric repair task that is in the preparing state. Because this cmdlet bypasses safety checks, it may result in availability or data loss. Evaluate the potential impact of this operation before you use this cmdlet.

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

If you approve a repair task by force, then the ForcedApproval flag is set on that task.

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: Approve a repair task

PS C:\> Approve-ServiceFabricRepairTask -TaskId "MyRepairTaskID"

This command approves the repair task that has the ID MyRepairTaskId.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

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

-TaskId

Specifies the ID of the repair task to approve.

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

-TimeoutSec

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

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:Int64
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.String

System.Int64

Outputs

System.Object