Start-VMTrace

Start-VMTrace

Starts tracing to a file.

語法

Parameter Set: Default
Start-VMTrace [-Level] <TraceLevel> {Off | Error | Warning | Info | Verbose} [-Path <String> ] [-TraceVerboseObjects] [ <CommonParameters>]

詳細描述

The Start-VMTrace cmdlet starts tracing to a file. You can use this information for advanced debugging.

參數

-Level<TraceLevel>

Specifies the level of tracing. 這個參數可接受的值如下:

-- Off
-- Error
-- Warning
-- Info
-- Verbose

別名

none

必要項?

true

位置?

1

預設值

none

接受管線輸入?

false

接受萬用字元?

false

-Path<String>

Specifies the path of the file where this cmdlet stores the trace information.

別名

none

必要項?

false

位置?

named

預設值

none

接受管線輸入?

false

接受萬用字元?

false

-TraceVerboseObjects

Specifies that tracing uses verbose objects.

別名

none

必要項?

false

位置?

named

預設值

none

接受管線輸入?

false

接受萬用字元?

false

<CommonParameters>

這個指令程式支援一般參數:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 和 -OutVariable。如需詳細資訊,請參閱 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

輸入

輸入類型是可透過管道傳送至指令程式的物件類型。

輸出

輸出類型是指令程式所發出的物件類型。

  • System.Object

範例

Example 1: Start error tracing

This command starts tracing at the level of Error.

PS C:\> Start-VMTrace -Level Error 

相關主題

Stop-VMTrace