Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Start-ServiceFabricPartitionRestart
- Module:
- ServiceFabric Module
Initiates the restart of a stateful service partition.
Syntax
PartitionId
Start-ServiceFabricPartitionRestart
-OperationId <Guid>
-RestartPartitionMode <RestartPartitionMode>
-PartitionId <Guid>
-ServiceName <Uri>
[-TimeoutSec <Int32>]
[<CommonParameters>]
ServiceNameRandomPartition
Start-ServiceFabricPartitionRestart
-OperationId <Guid>
-RestartPartitionMode <RestartPartitionMode>
-ServiceName <Uri>
[-TimeoutSec <Int32>]
[<CommonParameters>]
ServiceNamePartitionSingleton
Start-ServiceFabricPartitionRestart
-OperationId <Guid>
-RestartPartitionMode <RestartPartitionMode>
-ServiceName <Uri>
[-PartitionKindSingleton]
[-TimeoutSec <Int32>]
[<CommonParameters>]
ServiceNamePartitionNamed
Start-ServiceFabricPartitionRestart
-OperationId <Guid>
-RestartPartitionMode <RestartPartitionMode>
-ServiceName <Uri>
-PartitionKey <String>
[-PartitionKindNamed]
[-TimeoutSec <Int32>]
[<CommonParameters>]
ServiceNamePartitionUniformedInt
Start-ServiceFabricPartitionRestart
-OperationId <Guid>
-RestartPartitionMode <RestartPartitionMode>
-ServiceName <Uri>
-PartitionKey <String>
[-PartitionKindUniformInt64]
[-TimeoutSec <Int32>]
[<CommonParameters>]
Description
The Start-ServiceFabricPartitionRestart cmdlet initiates the restart of a stateful service partition in Azure Service Fabric. To run this cmdlet, FaultAnalysisService must be enabled.
Run this cmdlet to restart only partitions for stateful services. Do not use this cmdlet to restart partitions for system services.
You can check the progress of the operation by using the Get-ServiceFabricPartitionRestartProgress cmdlet.
Examples
Example 1: Restart all replicas of a service by partition ID
PS C:\> Start-ServiceFabricPartitionRestart -OperationId 53ba886b-79be-46ee-bf7e-d79db64eb003 -RestartPartitionMode AllReplicasOrInstances -PartitionId 20a726d0-3112-4c5a-a22c-2e4b8ee85280 -ServiceName "fabric:/ContosoApp/ContosoService"
This command restarts all replicas of the service named fabric:/ContosoApp/ContosoService in the partition that has the ID 20a726d0-3112-4c5a-a22c-2e4b8ee85280. Specify a unique GUID for the OperationId parameter. You can use this ID to check the progress of the restart operation.
Example 2: Restart all replicas of a service by partition key
PS C:\> Start-ServiceFabricPartitionRestart -OperationId ebd322c2-b1d3-46a7-b254-3cc42e6ca2d1 -RestartPartitionMode AllReplicasOrInstances -ServiceName "fabric:/ContosoApp/ContosoService" -PartitionKindUniformInt64 -PartitionKey 2000
This command restarts all replicas of the service named fabric:/ContosoApp/ContosoService in the partition that has the partition key 2000. Specify a unique GUID for the OperationId parameter.
Parameters
-OperationId
Specifies a unique identifier for this operation. Specify a unique value. You can check the progress of the operation by using this ID and the Get-ServiceFabricPartitionRestartProgress cmdlet.
Parameter properties
| Type: | Guid |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PartitionId
Specifies the ID of the Service Fabric partition that this cmdlet restarts.
Parameter properties
| Type: | Guid |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PartitionKey
Specifies the key of the Service Fabric partition that this cmdlet restarts.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PartitionKindNamed
Indicates that the Service Fabric partition that this cmdlet restarts is a Named partition.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PartitionKindSingleton
Indicates that the Service Fabric partition that this cmdlet restarts is a singleton partition.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PartitionKindUniformInt64
Indicates that the Service Fabric partition that this cmdlet restarts is a UniformInt64 partition.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-RestartPartitionMode
Specifies the mode for the partition restart operation. The acceptable values for this parameter are:
- AllReplicasOrInstances. Restart all replicas in the target partition.
- OnlyActiveSecondaries. Restart only the secondaries in the target partition.
Parameter properties
| Type: | RestartPartitionMode |
| Default value: | None |
| Accepted values: | Invalid, AllReplicasOrInstances, OnlyActiveSecondaries |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ServiceName
Specifies the Uniform Resource Identifier (URI) of a Service Fabric service.
Parameter properties
| Type: | Uri |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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
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.
