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.
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
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
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-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
PartitionId
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-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
ServiceNamePartitionNamed
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
ServiceNamePartitionUniformedInt
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-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
ServiceNamePartitionNamed
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-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
ServiceNamePartitionSingleton
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-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
ServiceNamePartitionUniformedInt
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-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.
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
(All)
Position:
Named
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
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.