I'm trying to use the
/fi option to filter multiple PIDs.
tasklist.exe /v /fi "PID eq 3248" /fi "PID eq 9488"
INFO: No tasks are running which match the specified criteria.
This doesn't work. I can only assume the filters are evaluated internally using logical-and and obviously would never be true.
How to filter by multiple PIDs?
Ugly alternative 1
If I run it separately, the result are OK and I can set the process information. However,
tasklist.exe /v /fi "PID eq 3248"
tasklist.exe /v /fi "PID eq 9488"
I'd like to refrain activating two separate commands.
Ugly alternative 2
tasklist.exe /v | find /i "9488"
Which brings the questions:
- How to I find multiple PIDs?
- How to make sure the found strings are really the PID and NOT anything else.