【发布时间】:2012-04-26 19:24:07
【问题描述】:
我的 powershell 脚本中有一个 foreach 循环,每次迭代期间都会在 shell 上打印 $output。有很多输出,shell 可以显示的条目数量是有限的。我希望将输出导出到文本文件。我知道如何在命令行中执行此操作。但是在powershell中怎么可能呢?
仅供参考,我正在使用命令行中的批处理脚本来运行 powershell 脚本
powershell c:\test.ps1 c:\log.log
【问题讨论】:
标签: windows powershell command-line scripting batch-file