Went with this workaround ..
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
سؤال
Why do I not get a proper list of processes below?
staf is running on remoteVM with correct trust levels.
[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
}
]
}
المحلول
Went with this workaround ..
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