Get-ServiceFabricPartition

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

Syntax

Get-ServiceFabricPartition
   [-PartitionId] <Guid>
   [-TimeoutSec <Int32>]
   [<CommonParameters>]
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.

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

-ServiceName

Specifies the URI of a Service Fabric service.

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

Inputs

System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

System.Uri

Outputs

System.Object