powershell - 如何从 Start-Process 获取输出
问题描述
如何从命令中获取输出?
为简单起见:
$proc = Start-Process ls -PassThru -Wait -ArgumentList '-a'
$OutPut = $proc.StandardOutput.ReadToEnd()
错误:
<Error retrieving property - InvalidOperationException>
解决方案
推荐阅读
- pandas - 如何在 seaborn 中使用 FacetGrid 绘制具有相同样式的单独线的不同试验?
- java - 如何通过 JFileChooser 保存 xml 文件
- javascript - 删除自定义标记(Google Maps Directions API)
- android - 压缩 Maybe 和 Single 会导致不发出任何结果
- excel - 将 Excel 的 SUMPRODUCT 与 SEARCH 一起使用并忽略空白单元格
- javascript - 如何通过javascript获取图像的大小?
- javascript - 带有 uikit 的粘性图像
- android - 无法在我的应用程序中使用 barteksc PDF 查看器
- spring-boot - 尝试使用 mysql 学习带有外键和一对多关系关系的 Springboot 但是
- mongodb - MongoDB 聚合 - 加入 ($lookup) 具有某些最高值的单个文档