Save-PefDataCollection

Save-PefDataCollection

Saves the data from a PEF Trace Session.

구문

Parameter Set: Default
Save-PefDataCollection [-PEFSession] <IPpkTraceSessionEx> [-Path] <String> [-Force] [-InformationAction <System.Management.Automation.ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String> ] [-SaveAsParsed] [-Trigger <Trigger[]> ] [ <CommonParameters>]

자세한 설명

The Save-PefDataCollection cmdlet creates an action that saves the data collection of a Protocol Engineering Framework (PEF) Trace Session to a file. This cmdlet enables you to specify the Trace Session to be saved and the path to a file in which to save the data collection.

You can also specify a trigger for the save action. When the trigger activates, the save action saves all messages currently contained in the Trace Session.

If you want to save data when the Trace Session stops, specify the SaveOnStop parameter when you create the Trace Session with the New-PefTraceSession cmdlet.

매개 변수

-Force

Performs the action without a confirmation message.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-InformationAction<System.Management.Automation.ActionPreference>

Specifies how this cmdlet responds to an information event. 이 매개 변수에 허용되는 값은 다음과 같습니다.

-- SilentlyContinue
-- Stop
-- Continue
-- Inquire
-- Ignore
-- Suspend

별칭

infa

필수 여부

false

위치

named

기본값

none

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-InformationVariable<System.String>

Specifies a variable in which to store an information event message.

별칭

iv

필수 여부

false

위치

named

기본값

none

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Path<String>

Specifies a file path. The action saves the contents of a Trace Session to this file.

별칭

none

필수 여부

true

위치

2

기본값

none

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-PEFSession<IPpkTraceSessionEx>

Specifies an object that contains a Trace Session. To create a Trace Session, use the New-PefTraceSession cmdlet.

별칭

none

필수 여부

true

위치

1

기본값

none

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-SaveAsParsed

Indicates that the cmdlet parses all messages fully, and saves them as a .matp file. By default, the cmdlet saves trace data as unparsed. The parsed data in a .matp file loads more quickly. The operation of parsing during capture causes the cmdlet to capture data more slowly.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Trigger<Trigger[]>

Specifies an array of Trigger objects. When one of these triggers runs, the associated action saves the contents of the Trace Session.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

예제

Example 1: Save the contents of a Trace Session with a stop trigger

This example creates a PEF Trace Session that you can save at any time by using the keyboard shortcut S.

The first command creates a Trace Session that runs in the Circular mode and stores a Trace Session object in the $TraceSession01 variable.

The second command uses the New-PefKeyDownTrigger cmdlet to create a trigger based on the keyboard shortcut S, and then stores it in the $Trigger01 variable.

The third command creates a save action for the Trace Session stored in $TraceSession01, which uses the trigger specified in $Trigger01. The command also specifies a name for the trace file to save. The command also uses the Force parameter and therefore does not prompt you before replacing an existing file.

The final command starts the Trace Session based on the configuration of the object stored in $TraceSession01.

PS C:\> $TraceSession01 = New-PefTraceSession -Mode Circular -SaveOnStop
PS C:\> $Trigger01 = New-PefKeyDownTrigger -Key S
PS C:\> Save-PefDataCollection -PEFSession $TraceSession01 -Path "C:\Traces\Trace01.matu" -Force -Trigger $Trigger01
PS C:\> Start-PefCaptureSession -PEFSession $TraceSession01

관련 항목

New-PefDateTimeTrigger

New-PefKeyDownTrigger

New-PefMessageTrigger

New-PefProcessTrigger

New-PefTimeSpanTrigger

New-PefTraceSession