更新时间:2023-11-13 22:03:04
这可能会有所帮助:
$msg = "Output of other.exe: " + "`r`n" + ( (.\other.exe) -join "`r`n")
您从other.exe获取行列表,而不是文本
You get a list of lines and not a text from other.exe
$a = ('abc', 'efg')
"Output of other.exe: " + $a
$a = ('abc', 'efg')
"Output of other.exe: " + "`r`n" + ($a -join "`r`n")