Get-ServiceFabricApplication

Gets all the applications in the Service Fabric cluster or a specific application.

Syntax

Get-ServiceFabricApplication
   [[-ApplicationName] <Uri>]
   [-ApplicationTypeName <String>]
   [-ExcludeApplicationParameters]
   [-ApplicationDefinitionKindFilter <ApplicationDefinitionKindFilter>]
   [-TimeoutSec <Int32>]
   [<CommonParameters>]

Description

The Get-ServiceFabricApplication cmdlet gets all the applications in the Service Fabric cluster or a specific application.

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 applications

PS C:\> Get-ServiceFabricApplication

This command gets all the applications in the cluster.

Example 2: Get application by name

PS C:\> Get-ServiceFabricApplication -ApplicationName fabric:/MyApplication

This command gets the specific application with the name fabric:/MyApplication.

Example 3: Get application by type name

PS C:\>Get-ServiceFabricApplication -ApplicationTypeName MyType

This command gets the Service Fabric application(s) whose type name is MyType.

Example 4: Get application by definition kind

PS C:\>Get-ServiceFabricApplication -ApplicationDefinitionKindFilter ServiceFabricApplicationDescription

This command gets the Service Fabric application(s) which are defined by Service Fabric application description.

Optional Parameters

-ApplicationDefinitionKindFilter

Specifies the filter for ApplicationDefinitionKindFilter based on how the application is defined. The value can be obtained from members or bitwise operations on members of ApplicationDefinitionKindFilter. Only applications that match the filter are returned. At most one of ApplicationName, ApplicationTypeName, or ApplicationDefinitionKindFilter can be specified. If no filter is specified, all applications are returned.

Type:ApplicationDefinitionKindFilter
Parameter Sets:Default, ServiceFabricApplicationDescription, Compose, All
Position:Named
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 application that has the specified URI. At most one of ApplicationName, ApplicationTypeName, or ApplicationDefinitionKindFilter can be specified. If no filter is specified, all applications are returned.

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

Specifies the application type name used to filter the applications to query for. At most one of ApplicationName, ApplicationTypeName, or ApplicationDefinitionKindFilter can be specified. If no filter is specified, all applications are returned.

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

Specifies whether application parameters will be excluded from the result.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
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

A URI that represents the name of the Service Fabric application used as filter for the request.

Outputs

System.Object

This cmdlet returns System.Fabric.Query.Application objects that represent requested applications.