Set-ASAppMonitoring

Set-ASAppMonitoring

Configures monitoring information at a specified scope. You can monitor your application by capturing tracing information emitted by the application at run time and storing it in the monitoring store. The captured information is then available in the Dashboard feature in the IIS Management console, or directly from the monitoring store.

Syntax

Parameter Set: SiteNameAndVirtualPath
Set-ASAppMonitoring [-SiteName] <String> [[-VirtualPath] <String> ] -MonitoringLevel {<Custom> | <EndToEndMonitoring> | <ErrorsOnly> | <HealthMonitoring> | <Off> | <Troubleshooting>} [-ConnectionStringName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]


Detailed Description

The following configuration changes occur from running the Set-ASAppMonitoring cmdlet to the <microsoft.applicationServer> configuration element.

<default enabled="true" connectionStringName="ApplicationServerMonitoringConnectionString" monitoringLevel="HealthMonitoring" />

Parameters

-ApplicationObject<ApplicationInfo>

An object that application configuration cmdlets output.  This allows piping IIS configuration scope between commands.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

-ConnectionStringName<String>

Name of a connection string that is defined in a configuration file.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-MonitoringLevel<MonitoringLevel>

The desired monitoring level from the following choices:


The acceptable values for this parameter are:

Custom

EndToEndMonitoring

ErrorsOnly

HealthMonitoring

Off

Troubleshooting



Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-Root

Indicates that only the root web.config file should be targeted.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

-SiteName<String>

The IIS Web Site Name used to filter the configuration search.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-Uri<Uri>

The Uri to an application whose configuration should be targeted.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-VirtualPath<String>

The IIS Virtual Path used to filter the configuration search.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<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.

  • ApplicationInfo


Outputs

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

  • MonitoringInfo


Examples

Example 1

This cmdlet example sets the monitoring settings at the root level. It sets the monitoring level to HealthMonitoring, and confirms with the user that this cmdlet should be run.


PS C:\Windows\system32> Set-ASAppMonitoring -MonitoringLevel HealthMonitoring -Confirm -ConnectionStringName ApplicationServerMonitoringConnectionString -RootConfirm Are you sure you want to perform this action?Performing operation "Set monitoring level configuration" on Target "root web.config".[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): yConnectionStringName : ApplicationServerMonitoringConnectionStringConnectionString : Data Source=MICROSO-XNMDH06; Initial Catalog=AppFabricMonitoringStore; Integrated Security=TrueIsEnabledTrueMonitoringLevel : HealthMonitoringProviderId : c651f5f6-1c0d-492e-8ae1-b4efd7c9d503ProviderName : System.Data.SqlClientTrackingProfile : HealthMonitoring Tracking ProfileSiteName: VirtualPath :

Example 2

This cmdlet example sets the monitoring settings at the application level. It sets the monitoring level to HealthMonitoring.


PS C:\Windows\system32> Set-ASAppMonitoring -Sitename "Default Web Site" -VirtualPath "/MyWorkflowApp" -MonitoringLevel HealthMonitoring -ConnectionStringName ApplicationServerMonitoringConnectionStringConnectionStringNameApplicationServerMonitoringConnectionStringConnectionString : Data Source=MICROSO-XNMDH06;Initial Catalog=AppFabricMonitoringStore;Integrated Security=TrueIsEnabledTrueMonitoringLevel : HealthMonitoringProviderId : 0d163658-e838-4ade-adff-f0d8a8e20b52ProviderName: System.Data.SqlClientTrackingProfile : HealthMonitoring Tracking ProfileSiteName: Default Web SiteVirtualPath : /MyWorkflowApp
Show: