Skip to content

Latest commit

 

History

History
91 lines (59 loc) · 2.02 KB

File metadata and controls

91 lines (59 loc) · 2.02 KB
external help file PSDiagnostics-help.xml
Locale en-US
Module Name PSDiagnostics
ms.date 12/12/2022
online version https://learn.microsoft.com/powershell/module/psdiagnostics/enable-pswsmancombinedtrace?view=powershell-7.6&WT.mc_id=ps-gethelp
schema 2.0.0
title Enable-PSWSManCombinedTrace

Enable-PSWSManCombinedTrace

SYNOPSIS

Start a logging session with the WSMan and PowerShell providers enabled.

SYNTAX

Enable-PSWSManCombinedTrace [-DoNotOverwriteExistingTrace] [<CommonParameters>]

DESCRIPTION

This cmdlet is only available on the Windows platform.

This cmdlet starts a logging session with the following PowerShell providers enabled:

  • Microsoft-Windows-PowerShell
  • Microsoft-Windows-WinRM

The session is named 'PSTrace'.

This cmdlet uses the Start-Trace cmdlet.

You must run this cmdlet from an elevated PowerShell session.

EXAMPLES

Example 1: Start a combined logging session

Enable-PSWSManCombinedTrace

PARAMETERS

-DoNotOverwriteExistingTrace

By default, the events are written to $PSHOME\Traces\PSTrace.etl. When this parameter is used, the cmdlet creates a unique filename: $PSHOME\Traces\PSTrace_{guid}.etl

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -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.

NOTES

RELATED LINKS

Event Tracing

Start-Trace

Disable-PSWSManCombinedTrace