Send-EtwTraceSession

適用対象: Windows 10, Windows Server Technical Preview

Send-EtwTraceSession

Copies ETW trace sessions to a folder.

構文

Parameter Set: ByName
Send-EtwTraceSession [-Name] <String[]> -DestinationFolder <String> [-CimSession <CimSession[]> ] [-DeleteAfterSend] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>] [ <WorkflowParameters>]

Parameter Set: InputObject (cdxml)
Send-EtwTraceSession -DestinationFolder <String> [-CimSession <CimSession[]> ] [-DeleteAfterSend] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>] [ <WorkflowParameters>]

詳細説明

The Send-EtwTraceSession cmdlet copies Event Trace for Windows (ETW) trace sessions to a folder. After you send the sessions to a specified destination folder, use an analysis tool, such as Microsoft Message Analyzer, to read them.

パラメーター

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。コンピューター名またはセッション オブジェクト (New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など) を入力します。既定値は、ローカル コンピューター上の現在のセッションです。

Aliases

Session

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-DeleteAfterSend

Indicates that this cmdlet deletes the local copy of the original trace file after this cmdlet successfully sends a snapshot to the specified location.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-DestinationFolder<String>

Specifies the location where this cmdlet stores ETW trace sessions.

Aliases

RemoteShare

必須/オプション

true

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Name<String[]>

Specifies an array of names of sessions to send to the destination folder.

Aliases

none

必須/オプション

true

位置

1

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

-ThrottleLimit<Int32>

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of zero is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Confirm

コマンドレットを実行する前に確認メッセージを表示します。

必須/オプション

false

位置

named

既定値

false

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-WhatIf

コマンドレットが実行された場合に何が起きるのかを示します。コマンドレットは実行されません。

必須/オプション

false

位置

named

既定値

false

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

<CommonParameters>

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

<WorkflowParameters>

入力

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

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

説明

  • The return values consist of a Win32 error code and a value returned by the cmdlet. The codes have the following meanings:

    0: Success. New file created. Existing file copied to the destination folder. Existing file deleted, if specified.
    1: CreateNewFileFailed. Operation halts at this point if a new file is not created.
    2: CopyFileFailed. New file created.
    3: DeleteOldFileFailed. New file created. Existing file copied to the destination folder.

使用例

Example 1: Send a trace session to a folder

This command sends an ETW trace session named WFP-IPsec Trace to the destination folder \\server17\traces\. The command deletes the local copy of the original trace after it is successfully copied.

PS C:\> Send-EtwTraceSession –Name "WFP-IPsec Trace" –DestinationFolder "\\server17\traces\" -DeleteExistingFileAfterSend

関連項目

Get-EtwTraceSession

Remove-EtwTraceSession

Set-EtwTraceSession