PowerShell Logo Small

Set-NetEventSession



This is the built-in help made by Microsoft for the command 'Set-NetEventSession', in PowerShell version 4 - as retrieved from Windows version 'Microsoft Windows 8.1 Enterprise' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Modifies a network event session.

SYNTAX


Set-NetEventSession [[-Name] [<String[]>]] [-CaptureMode {RealtimeRPC | SaveToFile | RealtimeLocal}] [-CimSession [<CimSession[]>]] [-LocalFilePath [<String>]] [-MaxF
ileSize [<UInt32>]] [-MaxNumberOfBuffers [<Byte>]] [-PassThru] [-ThrottleLimit [<Int32>]] [-TraceBufferSize [<UInt32>]] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-NetEventSession [-AssociatedEventProvider [<CimInstance>]] [-CaptureMode {RealtimeRPC | SaveToFile | RealtimeLocal}] [-CimSession [<CimSession[]>]] [-LocalFilePat
h [<String>]] [-MaxFileSize [<UInt32>]] [-MaxNumberOfBuffers [<Byte>]] [-PassThru] [-ThrottleLimit [<Int32>]] [-TraceBufferSize [<UInt32>]] [-Confirm] [-WhatIf] [<Com
monParameters>]
Set-NetEventSession [-CaptureMode {RealtimeRPC | SaveToFile | RealtimeLocal}] [-CimSession [<CimSession[]>]] [-LocalFilePath [<String>]] [-MaxFileSize [<UInt32>]] [-M
axNumberOfBuffers [<Byte>]] [-PassThru] [-ThrottleLimit [<Int32>]] [-TraceBufferSize [<UInt32>]] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Set-NetEventSession cmdlet modifies a network event session. A session controls how the computer logs events and, optionally, network traffic, or packets. A sessi
on requires at least one network event provider for logging. A network event provider logs events and network traffic as Event Tracing for Windows (ETW) events. The s
ession stores these events in an .etl file or provides them to an application that displays them.


Specify a session to modify by using its name, or get a session to modify by using the Get-NetEventSession cmdlet. You can remove a session by using the Remove-NetEve
ntSession cmdlet. Use the New-NetEventSession cmdlet to create a session. Only one session can exist at a time.


You can modify the maximum number of buffers in a session and the size of the trace buffer.


You can also modify whether to use an.etl file and, if you do, specify its location and maximum size. Instead of an .etl file, you can select a type of live display.


Use the Start-NetEventSession and Stop-NetEventSession cmdlets to start and stop logging. If you make changes to a session that is currently running, you must stop an
d restart the session for your changes to take effect.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=294404
Get-NetEventSession
New-NetEventSession
Remove-NetEventSession
Start-NetEventSession
Stop-NetEventSession
Get-NetEventProvider

REMARKS

<

Examples


Example 1: Modify the file path for a session

PS C:\>Set-NetEventSession -LocalFilePath 'C:\WINDOWS\Temp\Trace.etl'



This command modifies the file path for the network event session on the current computer. The new path is C:\WINDOWS\Temp\Trace.etl. If you make changes to a session
that is currently running, use the Stop-NetEventSession and Start-NetEventSession cmdlets to stop and restart logging.