Skip to content

Disable-PSTrace

SYNOPSIS

Disables the Microsoft-Windows-PowerShell event provider logs.

SYNTAX

Disable-PSTrace [-AnalyticOnly]

DESCRIPTION

> This cmdlet is only available on the Windows platform. This cmdlet disables the Operational and Analytic event logs of the Microsoft-Windows-PowerShell event provider.

You must run this cmdlet from an elevated PowerShell session.

EXAMPLES

Example 1: Disable the Analytic event log for PowerShell

Disable-PSTrace -AnalyticOnly

PARAMETERS

-AnalyticOnly

When this parameter is used, the cmdlet disables the Analytic event log of the Microsoft-Windows-PowerShell provider. The Operational event log is not changed.

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

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

INPUTS

None

OUTPUTS

None

NOTES

This cmdlet uses the `Get-LogProperties` and `Set-LogProperties` cmdlets.

You must run this cmdlet from an elevated PowerShell session.

Get-LogProperties

Set-LogProperties

Enable-PSTrace

Back to top