从Poweshell执行PsExec64.exe并抛出“无法处理'Error'流中的XML”

时间:2018-10-18 08:17:12

标签: powershell psexec

从PowerShell脚本中,我正在使用以下参数执行Abs(CBool(col))

$CommandToExecute = "& >\PsExec64.exe -accepteula -nobanner -s powershell -Command {Another_Power_Shell_Script Arguments_To_Script}"

Invoke-Expression -Command:$CommandToExecute

此后,我在日志文件中遇到以下错误:

PsExec64.exe : Cannot process the XML from the 'Error' stream of
'<<Script_Path>>\PsExec64.exe': Data at the root level is  invalid.
Line 1, position 830. At line:1 char:1
+ & <<Script_Path>>\PsExec64.exe -accepteula -nobanner -s powershell -Command  { ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SyntaxError: (<<Script_Path>>\PsExec64.exe:String) [], XmlException
    + FullyQualifiedErrorId : ProcessStreamReader_CliXmlError

有输入吗?

0 个答案:

没有答案