Add-PefMessageSource
Add-PefMessageSource
Adds message sources to a PEF Trace Session.
구문
Parameter Set: Default
Add-PefMessageSource [-PEFSession] <IPpkTraceSession> [-Source] <Object[]> [-InformationAction <System.Management.Automation.ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String> ] [-LogConfiguration <String> ] [ <CommonParameters>]
자세한 설명
The Add-PefMessageSource cmdlet adds message sources to a Trace Session. You can specify a file containing message data as a source or use Event Tracing for Windows (ETW) providers for a Protocol Engineering Framework (PEF) Live Trace Session.
매개 변수
-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 |
-LogConfiguration<String>
Specifies the text log configuration file to use to parse the source data. Specify this parameter if you use text log files as a message source.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 적용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-PEFSession<IPpkTraceSession>
Specifies an object that contains a Trace Session. To create a Trace Session, use the New-PefTraceSession cmdlet. This cmdlet adds message sources to the session object that this parameter specifies.
별칭 |
none |
필수 여부 |
true |
위치 |
1 |
기본값 |
none |
파이프라인 입력 적용 여부 |
True (ByValue) |
와일드카드 문자 허용 여부 |
false |
-Source<Object[]>
Specifies an array of message provider names.
별칭 |
Provider |
필수 여부 |
true |
위치 |
2 |
기본값 |
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: Add a trace file as a message source for a Trace Session
The first command creates a PEF Trace Session object, and then stores it in the $TraceSession01 variable.
The second command adds a saved Microsoft Network Monitor capture file (.cap) as the message source for the Trace Session stored in the $TraceSession01 variable.
The final command starts the Trace Session stored in the $TraceSession01 variable.
C:\PS> $TraceSession01 = New-PefTraceSession
C:\PS> Add-PefMessageSource -PEFSession $TraceSession01 -Source "C:\Captures\UDP10k.cap"
C:\PS> Start-PefTraceSession -PEFSession $TraceSession01
Example 2: Add a PEF message provider to a Trace Session
The first command creates a PEF Trace Session object, and then stores it in the $TraceSession01 variable.
The second command adds the Microsoft-Pef-WFP-MessageProvider as the provider for the Trace Session object stored in the $TraceSession01 variable.
The final command starts the Trace Session stored in the $TraceSession01 variable.
C:\PS> $TraceSession01 = New-PefTraceSession
C:\PS> Add-PefMessageSource -PEFSession $TraceSession01 -Source "Microsoft-Pef-WFP-MessageProvider"
C:\PS> Start-PefTraceSession -PEFSession $TraceSession01
Example 3: Add a manifest-based ETW provider to a Trace Session
The first command creates a PEF Trace Session object, and then stores it in the $TraceSession01 variable.
The second command adds the Microsoft-Windows-Dhcp-Client system ETW provider to the Trace Session object stored in the $TraceSession01 variable.
The final command starts the Trace Session stored in the $TraceSession01 variable.
C:\PS> $TraceSession01 = New-PefTraceSession
C:\PS> Add-PefMessageSource -PEFSession $TraceSession01 -Source "Microsoft-Windows-Dhcp-Client"
C:\PS> Start-PefTraceSession -PEFSession $TraceSession01
Example 4: Add a text log file as a message source for a Live Trace Session
The first command creates a PEF Trace Session object, and then stores it in the $TraceSession01 variable.
The second command adds a saved IIS text log as the message source for the Trace Session stored in $TraceSession01 and uses the LogConfig parameter to specify the configuration file that is required to parse the log.
The final command starts the Trace Session stored in $TraceSession01.
C:\PS> $TraceSession01 = New-PefTraceSession
C:\PS> Add-PefMessageSource -PEFSession $TraceSession01 -Provider "C:\Captures\IIS.log" -LogConfig IIS
C:\PS> Start-PefTraceSession -PEFSession $TraceSession01