I'm trying to kill a secondary task of a process using powershell, batch, python...anything I can save as script and run it remotely. TaskManager picture as following:
I'd like to kill the one with longer title leaving the "SAP Logon 740" open. Every task of the tree have the same PID, so I can't just kill the process.
I guess this is posible, because I can do it manually going to Task MAnager, expanding the process and ending that specific task but everything I've found consist in killing the process, which isn't possible in my case.
I've so far tried with tasklist/taskkill, powershell (Get-Process, Get-Object Win32_Process...) but I haven't been able to find how to.
Here you have the output of TaskList (Status=Running)
Only one of the task (the one which is front) is showing there.
TaskList /V /Fi "Status Eq Running"
. - CompoPID
of2612
, as I've already stated. Now open a Command Prompt window, enterTaskKill /?
and read the usage information. You'll notice that you can filter its selections using information such as its Image Name and Window Title! - CompoTaskkill /F /FI "WINDOWTITLE eq ABAP*"
it closes both windows, the one with windowtitle ABAP* and the one with SAP LOGON 740. - iVrLx