且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PowerShell“回显"

更新时间:2023-11-14 16:02:40

Start-Transcript 没有捕获任何 exe 输出.这对我来说是一个表演终结者.我不想这么说,但我发现这样做的***方法是:

Start-Transcript doesn't catch any exe output. That's a show stopper for me. I hate to say it but the best way I've found to do this is:

cmd /c powershell.exe -file c:usershillrfoo.ps1 > foo.log

这捕获了所有 AFAICT.

This captures everything AFAICT.