external help file | Module Name | online version | schema |
---|---|---|---|
PSEtw.dll-Help.xml |
PSEtw |
2.0.0 |
Stops an active PSEtw trace session.
Stop-PSEtwTrace [-InputObject] <EtwEventArgs> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Stops a PSEtw trace session started by Trace-PSEtwEvent. The trace session associated with the event provided to this cmdlet is the one that will be stopped.
PS C:\> Trace-PSEtwEvent -Provider MyProvider | ForEach-Object {
$_
if ($_.Header.Descriptor.Id -eq 10) {
$_ | Stop-PSEtwTrace
}
}
Will capture events for the provider MyProvider
until an event with the Id
of 10
is received.
The trace is stopped by piping the event into Stop-PSEtwTrace
.
The event object that was created by the trace session that should be stopped.
Type: EtwEventArgs
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
New common parameter introduced in PowerShell 7.4.
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
The trace event can be provided as pipeline input.
This cmdlet does not output anything.