Disable-PSTrace
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: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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.