Get-​Service​Fabric​Partition

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.

Required 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:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServiceName

Specifies the URI of a Service Fabric service.

Type:Uri
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-TimeoutSec

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

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

Inputs

System.Uri, System.Guid

Outputs

System.Object