| 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 |
Start a logging session with the WSMan and PowerShell providers enabled.
Enable-PSWSManCombinedTrace [-DoNotOverwriteExistingTrace] [<CommonParameters>]
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.
Enable-PSWSManCombinedTraceBy 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: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
You can't pipe objects to this cmdlet.
This cmdlet returns no output.