Get-​Service​Fabric​Deployed​Replica

Gets information about a Service Fabric replica on a node.

Syntax

Get-ServiceFabricDeployedReplica
   [-NodeName] <String>
   [-Adhoc]
   [[-ServiceManifestName] <String>]
   [[-PartitionId] <Guid>]
   [-TimeoutSec <Int32>]
   [<CommonParameters>]
Get-ServiceFabricDeployedReplica
   [-NodeName] <String>
   [-ApplicationName] <Uri>
   [[-ServiceManifestName] <String>]
   [[-PartitionId] <Guid>]
   [-TimeoutSec <Int32>]
   [<CommonParameters>]

Description

The Get-ServiceFabricDeployedReplica cmdlet gets information about a Service Fabric replica running on a node. This provides additional information such as the name of the code package hosting the replica that is not available from Get-ServiceFabricReplica

This information may be different from the information returned by the Get-ServiceFabricReplica cmdlet because the node has the most current view of the replica.

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 all deployed replicas

PS C:\> Get-ServiceFabricDeployedReplica -NodeName "Node01" -ApplicationName fabric:/MyApplication

This command gets all deployed replicas for application fabric:/MyApplication on node Node01.

Required Parameters

-Adhoc

Indicates that the service runs in ad hoc mode. In ad hoc mode, you manually activate the service host.

Type:SwitchParameter
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ApplicationName

Specifies the Uniform Resource Identifier (URI) of a Service Fabric application. The cmdlet gets the information about replicas of the application that has the URI that you specify.

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

Specifies the name of a Service Fabric node. The cmdlet gets the information of the replicas running on the node that you specify.

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

Optional Parameters

-PartitionId

Specifies the ID of a Service Fabric partition. This is an additional filter to return the replica that belongs to a specific partition.

Type:Guid
Position:4
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServiceManifestName

Specifies the name of a Service Fabric service manifest in the application specified by the ApplicationName parameter. This parameter can be used to filter to only replicas in a specific service manifest.

Type:String
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-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, String

This cmdlet accepts a URI that represents the name of a Service Fabric application, or a string that represents a Service Fabric node name where replicas are deployed, or a GUID of a Service Fabric partition filter, or a string that represents a service manifest name filter.

Outputs

System.Object

This cmdlet returns DeployedServiceReplica objects that represent the replicas running on the node.