使用以下设置日志记录时:
$ErrorActionPreference="SilentlyContinue"
Stop-Transcript | out-null
$ErrorActionPreference = "Continue"
Start-Transcript -path C:\output.txt
始终添加以下标题 - 有什么方法可以阻止添加?
**********************
Windows PowerShell transcript start
Start time: 20130413235532
Username : computer\administrator
Machine : wsa (Microsoft Windows NT 6.2.9200.0)
**********************
Transcript started, output file is C:\output.txt