Start-WebApplicationMonitoring

Start-WebApplicationMonitoring

Starts monitoring an Internet Information Services (IIS) web application.

構文

Parameter Set: Default
Start-WebApplicationMonitoring [-Name] <String> [-Mode] <MonitoringMode> {Custom | Monitor | Trace} [-OutputPath] <String> [[-MaximumFileSizeInMegabytes] <UInt32> ] [-CollectionPlan <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Start-WebApplicationMonitoring cmdlet starts monitoring an IIS web application and writes application events and traces to a Visual Studio IntelliTrace file.

Start-WebApplicationMonitoring supports multiple levels of monitoring, controlled by the Mode parameter. Enable lightweight collection of exception and performance events by setting the value of Mode to monitor. Enable deeper tracing by setting the value of Mode to trace. Enable custom settings by setting the value of Mode to custom and setting the CollectionPlan parameter to point to a custom collection plan file.

After monitoring has started, use the Checkpoint-WebApplicationMonitoring cmdlet or the Stop-WebApplicationMonitoring cmdlet to create an IntelliTrace file in the specified output directory.

Start-WebApplicationMonitoring must be run with sufficient permissions to recycle the application pool that runs the web application. By default, this requires administrator permissions.

パラメーター

-CollectionPlan<String>

Specifies the path and file name of the custom collection plan to use for monitoring. The path to the collection plan can be relative or absolute.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-MaximumFileSizeInMegabytes<UInt32>

Specifies, in megabytes (MB), the maximum size allowed for each IntelliTrace file. When the maximum file size is reached, the oldest data are overwritten.

エイリアス

なし

必須?

false

位置は?

4

既定値

250

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Mode<MonitoringMode>

Specifies the mode to use for monitoring. Valid values are:

-- Monitor. Set this value to Monitor for lightweight monitoring of exceptions and performance.

-- Trace. Set this value to Trace for function-level application tracing.

-- Custom. Set this value to Custom to specify a custom collection plan. When Custom is specified, the CollectionPlan parameter is required.

エイリアス

なし

必須?

true

位置は?

2

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Name<String>

Specifies the name of the web application to start monitoring. This name is listed in IIS Manager. Valid values for this parameter are:

-- A web application name. A web application name must be specified as <website name>/<web application name>. For example, "Default Web Site/WebApp1".

-- An IIS path. For example, "IIS:\sites\Default Web Site\WebApp1".

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-OutputPath<String>

Specifies the directory in which to store IntelliTrace files that are created by using the Checkpoint-WebApplicationMonitoring or Stop-WebApplicationMonitoring cmdlets. The directory must exist prior to running Start-WebApplicationMonitoring. When the Mode parameter is set to Trace, the application pool identity must have read/write permissions to the specified directory.

エイリアス

なし

必須?

true

位置は?

3

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • System.Object

    You may pipe any object that has public "Name", "Mode", and "OutputPath" properties.

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

Example 1: Start monitoring for exception and performance events for a web application

This command starts monitoring for exception and performance events for the web application named WebApp1 in the website named Default Web Site. The application pool that contains WebApp1 is recycled to enable monitoring. The IntelliTrace file that is written when Checkpoint-WebApplicationMonitoring or Stop-WebApplicationMonitoring is run is saved to C:\outputfolder.

C:\PS>Start-WebApplicationMonitoring -Name "Default Web Site/WebApp1" -Mode Monitor -OutputPath C:\outputfolder

Example 2: Start function-level application tracing for a web application

This command starts function-level application tracing for the web application named WebApp1 in the website named Default Web Site. The application pool that contains WebApp1 is recycled to enable monitoring. The IntelliTrace file that is written when Checkpoint-WebApplicationMonitoring or Stop-WebApplicationMonitoring is run is saved to C:\outputfolder.

C:\PS>Start-WebApplicationMonitoring -Name "Default Web Site/WebApp1" -Mode Trace -OutputPath C:\outputfolder

Example 3: Start custom monitoring of a web application

This command starts monitoring the application named WebApp1 in the website named Default Web Site, by using the IIS path syntax, based on the collection plan stored at C:\temp\collectionplan.xml. The application pool that contains WebApp1 is recycled to enable monitoring. The IntelliTrace file that is written when Checkpoint-WebApplicationMonitoring or Stop-WebApplicationMonitoring is run is saved to C:\outputfolder.

C:\PS>Start-WebApplicationMonitoring -Name "IIS:\sites\Default Web Site\WebApp1" -Mode Custom -CollectionPlan C:\temp\collectionplan.xml -OutputPath C:\outputfolder

関連トピック

Get-WebApplicationMonitoringStatus

Checkpoint-WebApplicationMonitoring

Stop-WebApplicationMonitoring