C:\workspaces\silverlight> start-transcript -?
NAME
Start-Transcript
SYNOPSIS
Creates a record of all or part of a Windows PowerShell session in a text file.
SYNTAX
Start-Transcript [[-Path] <string>] [-Append] [-Force] [-NoClobber] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Start-Transcript cmdlet creates a record of all or part of a Windows PowerShell session in a text file. The transcript includes all command that the user
types and all output that appears on the console.
RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkID=113408
Stop-Transcript
REMARKS
To see the examples, type: "get-help Start-Transcript -examples".
For more information, type: "get-help Start-Transcript -detailed".
For technical information, type: "get-help Start-Transcript -full".
注意#1:它只記錄寫入主控制檯輸出流的內容,而不是Warning/Error/Debug。
注2:如果你需要記錄本地控制檯應用程序,you'll need a slight workaround
我是一名程序員,我喜歡PowerShell,但我認爲這是一個非編程問題,屬於ServerFault。 – 2010-01-16 20:31:21