Share via


Get-ServiceFabricService

Gets a list of Service Fabric services.

Syntax

Non-Adhoc-AllPages (Default)

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

Adhoc

Get-ServiceFabricService
    [[-ServiceName] <Uri>]
    [-Adhoc]
    [-ServiceTypeName <String>]
    [-TimeoutSec <Int32>]
    [<CommonParameters>]

Non-Adhoc-SinglePage

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.

Parameter properties

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

Parameter sets

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

-ApplicationName

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

Parameter properties

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

Parameter sets

Non-Adhoc-AllPages
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
Non-Adhoc-SinglePage
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ContinuationToken

{{Fill ContinuationToken Description}}

Parameter properties

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

Parameter sets

Non-Adhoc-AllPages
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Non-Adhoc-SinglePage
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-GetSinglePage

{{Fill GetSinglePage Description}}

Parameter properties

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

Parameter sets

Non-Adhoc-SinglePage
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxResults

{{Fill MaxResults Description}}

Parameter properties

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

Parameter sets

Non-Adhoc-SinglePage
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

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

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

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

System.String

Outputs

System.Object