wmic进程无法使用staf

时间:2014-03-05 15:03:24

标签: windows automation wmic staf

为什么我下面没有正确的流程列表?
staf在具有正确信任级别的remoteVM上运行。

[user@system ~]# staf remoteVM PROCESS START SHELL COMMAND "wmic process" WAIT RETURNSTDOUT STDERRTOSTDOUT
Response
--------
{
  Return Code: 0
  Key        : <None>
  Files      : [
    {
      Return Code: 0
      Data       :  ■C
    }
  ]
}

1 个答案:

答案 0 :(得分:0)

使用此解决方法..

staf remoteVM PROCESS START SHELL COMMAND "WMIC /OUTPUT:C:\\ProcessList.txt PROCESS" WAIT RETURNSTDOUT STDERRTOSTDOUT
staf remoteVM PROCESS START SHELL COMMAND "type C:\\ProcessList.txt" WAIT RETURNSTDOUT STDERRTOSTDOUT