PSDiagnostics Module

PowerShell 診斷模組包含一組 Cmdlet,可讓您在 Windows 上的 PowerShell 中使用 ETW 追蹤。

本課程模組只能在 Windows 平臺上使用。

PSDiagnostics Cmdlet

指令程式 Description
Disable-PSTrace

Disables the PowerShellCore event provider logs.

Disable-PSWSManCombinedTrace

Stop the logging session started by Enable-PSWSManCombinedTrace.

Disable-WSManTrace

Stop the WSMan logging session started by Enable-WSManTrace.

Enable-PSTrace

Enables the PowerShellCore event provider logs.

Enable-PSWSManCombinedTrace

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

Enable-WSManTrace

Start a logging session with the WSMan providers enabled.

Get-LogProperties

Retrieves the properties of a Windows event log.

Set-LogProperties

Changes the properties of a Windows event log.

Start-Trace

Start an Event Trace logging session.

Stop-Trace

Stop an Event Trace logging session.