Get-ASAppPerformanceCounter

Get-ASAppPerformanceCounter

Returns data on whether performance counters are enabled or disabled for all services in one or more applications, and if enabled, at what level. PerformanceCountersInfo is returned with the level set to the value of the /configuration/system.serviceModel/diagnostics[@performanceCounters] attributePerformanceCountersInfo attribute. The performance counters can be enabled for all category counters (ServiceModelService, ServiceModelEndpoint, and ServiceModelOperation) (the All level); enabled for only ServiceModelService category counters (the ServiceOnly level); disabled (the Off level); or disabled by default (the Default level).

Syntax

Parameter Set: SiteNameAndVirtualPath
Get-ASAppPerformanceCounter [-SiteName] <String> [[-VirtualPath] <String> ] [ <CommonParameters>]

Parameters

-ApplicationObject<ApplicationInfo>

The name of the ApplicationObject, which specifies that the cmdlet will operate on that application.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

-Root

The name of the root application, which specifies that the cmdlet will operate at that scope. If you use the Root parameter, do not use the SiteName, VirtualPath, or Uri parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

-SiteName<String>

The name of a Web site, as defined in the IIS Connections pane, which specifies that the cmdlet will operate at the scope of an application or virtual directory contained within that site. To the SiteName parameter, you must add the VirtualPath parameter that identifies an application or virtual directory contained within the site. The virtual path must include the name of the application or virtual directory as defined in IIS. The leading "/" character in the virtual path is optional. If you use the SiteName parameter, do not use the Uri parameter.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-Uri<Uri>

A URI for an IIS application or virtual directory, which specifies that the cmdlet will operate at that scope. If you use the Uri parameter, do not use the SiteName and VirtualPath parameter set.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-VirtualPath<String>

The virtual path for an application or directory, as defined in the IIS Manager Connections pane, which specifies that the cmdlet will operate at the scope of that application or virtual directory. You must add the VirtualPath parameter to the SiteName parameter, using SiteName to identify the site that the application or directory is included in. The leading "/" character in the virtual path is optional. The virtual path includes the name of the application or directory, as defined in IIS. If you use the SiteName and VirtualName parameter set, do not use the Uri parameter.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • PerformanceCounterInfo. This is an enumeration consisting of Off, ServiceOnly, All, and Default. Off indicates that ServiceModel performance counters are disabled (the default value); ServiceOnly indicates that only ServiceModelService category counters are enabled; All indicates that all category counters (ServiceModelService, ServiceModelEndpoint and ServiceModelOperation) are enabled; and Default indicates that ServiceModel performance counters are disabled. Returns Null if /configuration/system.serviceModel/diagnostics[@performanceCounters] is missing.

Examples

EXAMPLE 1

Returns data on whether performance counters are enabled or disabled for all services in the myApp application in the Default Web Site, and if enabled, at what level.

Get-ASAppPerformanceCounter -SiteName “Default Web Site” -VirtualPath “/myApp”