Get-ServiceFabricService

Gets a list of Service Fabric services.

Syntax

Get-ServiceFabricService
   [-ApplicationName] <Uri>
   [[-ServiceName] <Uri>]
   [-ServiceTypeName <String>]
   [-ContinuationToken <String>]
   [-TimeoutSec <Int32>]
   [<CommonParameters>]
Get-ServiceFabricService
   [-Adhoc]
   [[-ServiceName] <Uri>]
   [-ServiceTypeName <String>]
   [-TimeoutSec <Int32>]
   [<CommonParameters>]
Get-ServiceFabricService
   [-ApplicationName] <Uri>
   [[-ServiceName] <Uri>]
   [-ServiceTypeName <String>]
   [-GetSinglePage]
   [-ContinuationToken <String>]
   [-MaxResults <Int64>]
   [-TimeoutSec <Int32>]
   [<CommonParameters>]

Description

The Get-ServiceFabricService cmdlet gets a list of Service Fabric services.

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 the services created from an application

PS C:\> Get-ServiceFabricService -ApplicationName fabric:/myapp/persistenttodolist

This command gets the Service Fabric services from the specified application.

Example 2: Get the system services running in a cluster

PS C:\> Get-ServiceFabricService -ApplicationName fabric:/System

This command gets the Service Fabric system services running in a cluster.

Parameters

-Adhoc

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

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

-ApplicationName

Specifies the Uniform Resource Identifier (URI) of a Service Fabric application. The cmdlet gets the services for the applications that you specify.

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

-ContinuationToken

{{Fill ContinuationToken Description}}

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

-GetSinglePage

{{Fill GetSinglePage Description}}

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-MaxResults

{{Fill MaxResults Description}}

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

-ServiceName

Specifies the URI of a Service Fabric service. ServiceName and ServiceTypeName can not be specified together. If neither ServiceName nor ServiceTypeName is specified, all services of the specified application are returned.

Type:Uri
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ServiceTypeName

Specifies the service type name used to filter the services to query for. Services that are of this service type will be returned. ServiceName and ServiceTypeName can not be specified together. If neither ServiceName nor ServiceTypeName is specified, all services of the specified application are returned.

Type:String
Position:Named
Default value:None
Required:False
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.Uri

System.String

Outputs

System.Object