Edit

Share via


Stop-Trace

Stop an Event Trace logging session.

Syntax

Default (Default)

Stop-Trace
    [-SessionName] <Object>
    [-ETS]
    [<CommonParameters>]

Description

This cmdlet is only available on the Windows platform.

This cmdlet stops a Windows Event Trace logging session.

This cmdlet is used by the following cmdlets:

  • Disable-PSWSManCombinedTrace
  • Disable-WSManTrace

You must run this cmdlet from an elevated PowerShell session.

Examples

Example 1: Stop a WSMan Trace logging session

Stop-Trace -SessionName 'wsmlog'

Parameters

-ETS

Send commands to Event Trace Sessions directly without saving or scheduling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SessionName

The name of the Event Trace session to be stopped.

Parameter properties

Type:Object
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

You can't pipe objects to this cmdlet.

Outputs

None

This cmdlet returns no output.