Skip to content

Latest commit

 

History

History
92 lines (60 loc) · 2.03 KB

Disable-PSTrace.md

File metadata and controls

92 lines (60 loc) · 2.03 KB
external help file Locale Module Name ms.date online version schema title
PSDiagnostics-help.xml
en-US
PSDiagnostics
12/12/2022
2.0.0
Disable-PSTrace

Disable-PSTrace

SYNOPSIS

Disables the Microsoft-Windows-PowerShell event provider logs.

SYNTAX

Disable-PSTrace [-AnalyticOnly] [<CommonParameters>]

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

The following example disables only the Analytic event log of the Microsoft-Windows-PowerShell provider.

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: 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

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

You must run this cmdlet from an elevated PowerShell session.

RELATED LINKS

Get-LogProperties

Set-LogProperties

Enable-PSTrace