Export (0) Print
Expand All

Display Services Using AppFabric Cmdlets

This topic describes how you display services and service instances by using AppFabric cmdlets.

noteNote
To execute an AppFabric cmdlet manually, open the Windows PowerShell console for AppFabric, enter the appropriate cmdlet, and then press ENTER. For more information about executing cmdlets, refer to Running AppFabric Cmdlets. For information about any of the classes or common parameters used in the syntax statements in this document, refer to Windows PowerShell for AppFabric Reference.

To get the services of an application

The Get-ASAppService cmdlet displays all services available at the specified scope. The following table describes the parameters of this cmdlet.

 

Parameter Description

-Root (optional)

If specified, the –Uri, -SiteName, and –ServiceObject parameters must not be specified. When you use this parameter, the cmdlet returns all the services hosted on the local server in the IIS/WAS environment.

Get-ASAppService –Root

-SiteName (optional)

If specified, the –Root, -Uri, –ServiceObject parameters must not be specified. When you use this parameter, the cmdlet returns all the services hosted on the specified Web site.

Get-ASAppService –SiteName “Default Web Site”

-VirtualPath (Optional)

Optional parameter used with -SiteName when neither –Uri nor –ServiceObject is specified. Specifies the virtual path to a service or application; for example, /MyDir1/MyApp1/POService.svc.

Get-ASAppService –SiteName “Default Web Site” –VirtualPath “/MyWFServiceApplication”

-Uri (Optional)

If specified, neither –SiteName, -VirtualPath, nor –ServiceObject must be specified. Specifies a URI to a site, application, or service. If specified, only services that are available under this URI are returned.

Get-ASAppService –Uri “http://localhost/MyWFServiceApplication”

-ApplicationObject (Optional)

If specified, neither –SiteName, -VirtualPath, nor –Uri must be specified. This parameter is typically used for piping the output from the Get-ASAppService cmdlet.

Get-Application | Get-ASAppService

-Count (Optional)

Returns the count of services.

Get-ASAppService -Count

For more information about this cmdlet, see Get-ASAppService.

To get a service instance

The Get-ASAppServiceInstance cmdlet displays information about service instance objects from one or more persistence stores. The Get-ASAppServiceInstance cmdlet queries a specified set of persistence stores and returns a collection of service instances that match supplied query parameters. The following table describes the parameters of this cmdlet.

 

Parameter Description

-Root (optional)

If specified, the –Uri, -SiteName, and –ServiceObject parameters must not be specified. When you use this parameter, the cmdlet returns all service instances on the local server.

Get-ASAppServiceInstance –Root

-SiteName (optional)

If specified, neither -Uri nor –ServiceObject must be specified. Specifies the name of a site. If specified, only instances of services that are hosted in the specified site are returned.

Get-ASAppServiceInstance –SiteName “Default Web Site”

-VirtualPath (Optional)

Optional parameter used with -SiteName when neither –Uri nor –ServiceObject is specified. Specifies the virtual path to a service or application; for example, /MyDir1/MyApp1/POService.svc.

Get-ASAppServiceInstance –SiteName “Default Web Site” –VirtualPath “/MyWFServiceApplication”

-Uri (Optional)

If specified, neither –SiteName, -VirtualPath, nor –ServiceObject must be specified. Specifies a URI to a site, application, or service. If specified, only service instances that are under this URI are returned.

Get-ASAppServiceInstance –Uri “http://localhost/MyWFServiceApplication”

-ServiceInfo (Optional)

If specified, neither –SiteName, -VirtualPath, nor –Uri must be specified. Specifies a ServiceInfo object that is used to determine the service instances to return information about. This parameter is typically used for piping the output from the Get-ASAppService cmdlet.

Get-ASAppService | Get-ASAppServiceInstance 

-ApplicationInfo (Optional)

If specified, neither –SiteName, -VirtualPath, nor –Uri must be specified. Specifies an ApplicationInfo object that is used to determine the service instances to return information about. This parameter is typically used for piping the output from the Get-ASApplication cmdlet.

Get-ASApplication | Get-ASAppServiceInstance

-Count (Optional)

Specifies that only a count of the number of instances found matching the query parameters should be returned.


//root level is the default level
Get-ASAppServiceInstance -Count

-CreatedTimeFrom (Optional)

Specifies the start of a range of time at which a service instance was first started. If this parameter is specified, only instances started on or after the given timestamp are returned.

Get-ASAppServiceInstance -CreatedTimeFrom 1/1/2009

-CreatedTimeTo (Optional)

Specifies the end of a range of time at which a service instance was first started. If this parameter is specified, only instances started on or before the given timestamp are returned.

Get-ASAppServiceInstance -CreatedTimeTo 6/1/2009
Get-ASAppServiceInstance -CreatedTimeFrom 1/1/2009 -CreatedTimeTo 6/1/2009

-MachineName (Optional)

Specifies a computer name. If specified, only service instances locked by this computer are returned.

Get-ASAppServiceInstance -MachineName

-ModifiedTimeFrom (Optional)

Specifies the start of a range of time at which a service instance was modified. If this parameter is specified, only instances modified on or after the given timestamp are returned.

Get-ASAppServiceInstance -ModifiedTimeFrom 1/1/2009

-ModifiedTimeTo (Optional)

Specifies the end of a range of time at which a service instance was modified. If this parameter is specified, only instances modified on or before the given timestamp are returned.

Get-ASAppServiceInstance -ModifiedTimeTo 6/1/2009
Get-ASAppServiceInstance -ModifiedTimeFrom 1/1/2009 -ModifiedTimeTo 6/1/2009

-ExceptionName (Optional)

Specifies a string representing the fully qualified type name of a .NET Framework exception. If specified, only service instances that terminated because of the specified exception are returned.

-MaxRows (Optional)

Specifies the number of rows (service instances) to return.

Get-ASAppServiceInstance –MaxRows 100

-InstanceId (Optional)

Specifies the instance ID (specified as a GUID) of the service instance to return. The instance ID uniquely identifies a service instance. If this parameter is specified, the instance with this ID is returned (if present).

-ServiceType (Optional)

Specifies a service by its type. If specified, only instances of this service type are returned. The service type may be expressed as a full or partial path or as a fully or partially qualified .NET Framework name and namespace. When you specify a service type by namespace, you must use the "#" character to separate the service type from the namespace. For example, if the fully qualified .NET Framework CLR service name is Contoso.Web.Sales.POService, the parameter value should be "Contoso.Web.Sales#POService".

You cannot explicitly specify wildcard characters; however, this parameter contains implied wildcard characters (”*”) preceding and following the supplied value. For example, "Contoso/Service.svc" is treated as "*Contoso/Service.svc*" and "Sales#POService" is treated as "*Sales#POService*".

-Status (Optional)

Specifies the instance status. If specified, only service instances of the specified state are returned by the query. The possible values for Status are: Running, Suspended, and Completed.

Get-ASAppServiceInstance -Status Completed

-Condition (Optional)

Specifies the instance condition. If specified, only service instances of the specified condition are returned by the query. The possible values for Condition are: Active, Idle, Exception, UserSuspension, Successful, Cancelled, and Terminated.

Get-ASAppServiceInstance -Condition Cancelled

-GroupBy (Optional)

Specifies a field that is used to group the returned service instance counts. The possible values for GroupBy are: UniqueApplication, UniqueService, ServiceType, Exception, Status, Site, and MachineName.

Get-ASAppServiceInstance –GroupBy Status

-OrderBy (Optional)

Displays the service instances sorted in the descending order of last updated time.

-ExcludeSubFolders (Optional)

If specified, excludes the results for instances in sub-applications from the results for the containing application.

-Timeout (Optional)

Specifies how long the cmdlet waits for the response from the database. The value is a time value of the format hh:mm:ss. The minimum value is 00:00:01 (1 sec), the maximum value is TimeSpan.MaxValue. If omitted, defaults to 00:02:00 (2 min).

-ReturnBinaryProperties (Optional)

If specified, returns the array of binary metadata properties from the returned InstanceInfo object.

For more information about this cmdlet, see Get-ASAppServiceInstance.

  2012-09-12
Show:
© 2014 Microsoft