Using Win2019 SRV, I have a process (process_name) in the tasklist.
Each user starts a new process_name (the same process) and in task manager I could see the same process with different user into "user column".
Users are User1, User2, User3, ...
So, I would like to kill the process_name started by User2, leaving the other, using a script.
With this batch file code I can find the process name and kill it
Tasklist | Findstr /I “process_name”
Taskkill /IM “process_name”
but in this way I'm killing this process for all users.
"Taskkill /U" select user that execute the command.
How can I select only processes executed by User2?
Thank you