SGa*_*att 20 powershell powershell-3.0
我想将Format-List命令的输出写入事件日志,所以我需要它作为字符串.
有没有一种通用的方法可以做到这一点,而不依赖于知道什么是格式化?
Ans*_*ers 31
使用Out-Stringcmdlet:
... | Format-List | Out-String
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13251 次 |
| 最近记录: |