Export (0) Print
Expand All

Add-PefMessageProvider

Windows Server 2012 R2 and Windows 8.1

Add-PefMessageProvider

Adds a message provider to a PEF Trace Session.

Syntax

Parameter Set: Default
Add-PefMessageProvider [-Session] <IPpkTraceSession> [-Provider] <String[]> [ <CommonParameters>]




Detailed Description

The Add-PefMessageProvider cmdlet adds a message provider to a Trace Session. You can also specify a file containing message data as a provider or use Event Tracing for Windows (ETW) providers for a Protocol Engineering Framework (PEF) Trace Session.

Parameters

-Provider<String[]>

Specifies an array containing one or more message provider names.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Session<IPpkTraceSession>

Specifies the Trace Session to which you will add one or more message providers. To create a Trace Session, use the New-PefTraceSession cmdlet.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

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.

Outputs

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

Examples

Example 1: Add a trace file as a message source for a Trace Session

The first command creates a PEF Trace Session object and 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-PefMessageProvider -Session $TraceSession01 -Provider "C:\Captures\UDP10k.cap"
C:\PS> Start-PefTraceSession -Session $TraceSession01

Example 2: Add a PEF message provider to a Trace Session

The first command creates a PEF Trace Session object and 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-PefMessageProvider -Session $TraceSession01 -Provider "Microsoft-Pef-WFP-MessageProvider"
C:\PS> Start-PefTraceSession -Session $TraceSession01

Example 3: Add a manifest-based ETW provider to a Trace Session

The first command creates a PEF Trace Session object and 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-PefMessageProvider -Session $TraceSession01 -Provider "Microsoft-Windows-Dhcp-Client"
C:\PS> Start-PefTraceSession -Session $TraceSession01

Example 4: Add a text log file as a message source for a Trace Session

The first command creates a PEF Trace Session object and 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.


PS C:\> $TraceSession01 = New-PefTraceSession
C:\PS> Add-PefMessageProvider -PEFSession $TraceSession01 -Provider "C:\Captures\IIS.log" –LogConfig IIS
C:\PS> Start-PefTraceSession -PEFSession $TraceSession01

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft