【发布时间】:2014-05-15 15:59:26
【问题描述】:
如何在 PowerShell 中使用 Start-Process 模拟此命令?
my.exe < my.inp 2>&1 | tee my.log
我已尝试按照here 的建议使用 PS 3.0 扩展输出重定向,但日志文件仅包含有关该进程的信息。
$app = Start-Process -PassThru -FilePath my.exe -RedirectStandardInput my.inp 2>&1 | Tee-Object my.log
Wait-Process $app.Id
【问题讨论】:
-
你知道PowerShell仍然不支持
<stdin 运算符,对吧?
标签: powershell