Hello. I've got 2 questions.
I am running the Windows tasklist command like so:
This returns all the processes of notepad.exe running.
But it gives all the detail (name/PID/memory usage/etc.) My first question is it possible to only return the PID?
My second question if it is possible to pipe the returned PID to the taskkill command to kill a specific process?
Thanks in advance.
I am running the Windows tasklist command like so:
Code:
tasklist /fi "STATUS eq running" /fi "Imagename eq notepad.exe" /nh
This returns all the processes of notepad.exe running.
But it gives all the detail (name/PID/memory usage/etc.) My first question is it possible to only return the PID?
My second question if it is possible to pipe the returned PID to the taskkill command to kill a specific process?
Thanks in advance.