Share via


Get-ServiceFabricPartition

Gets information about the partitions of a specified Service Fabric partition or service.

Syntax

QueryByPartitionId (Default)

Get-ServiceFabricPartition
    [-PartitionId] <Guid>
    [-TimeoutSec <Int32>]
    [<CommonParameters>]

QueryByServiceName

Get-ServiceFabricPartition
    [[-PartitionId] <Guid>]
    [-ServiceName] <Uri>
    [-TimeoutSec <Int32>]
    [<CommonParameters>]

Description

The Get-ServiceFabricPartition cmdlet gets information on the partitions of the specified service or on a specific partition. The returned partition information includes the partition health state, partition status, and service kind (see the Outputs section for more details).

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: Get partitions for a service

PS C:\> Get-ServiceFabricPartition -ServiceName fabric:/myapp/persistenttodolist/svc1

This command gets the information for all the partitions of the fabric:/myapp/persistenttodolist/svc1 service.

Example 2: Get a specific partition

PS C:\> Get-ServiceFabricPartition -PartitionId $ToDoPartition01.PartitionId

This command gets the information for the partition stored in the stored in $ToDoPartition01 object.

Parameters

-PartitionId

Specifies the ID of a Service Fabric partition. If you do not specify this parameter, this cmdlet gets all partitions of the specified service.

Parameter properties

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

Parameter sets

QueryByPartitionId
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ServiceName

Specifies the URI of a Service Fabric service.

Parameter properties

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

Parameter sets

QueryByServiceName
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

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.Nullable`1

System.Uri

Outputs

System.Object