February 20th, 2016

PowerTip: Use PowerShell to add ETW provider to a session

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to add an ETW provider to a session.

Hey, Scripting Guy! Question How can I use Windows PowerShell to add an ETW provider to a session?

Hey, Scripting Guy! Answer Use the Add-NetEventProvider cmdlet and specify the name of the session and the provider. In the following example, first a net event session is created, and then the TCPIP ETW provider is added to the session:

PS C:\>New-NetEventSession -SessionName “Session01”

PS C:\> Add-NetEventProvider -Name “Microsoft-Windows-TCPIP” -SessionName  “Session01”

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.