Unable to kill a process

2

1

With admin rights and Powershell, I want to kill a nasty process.

PS D:\_prj> Get-Process someapp* | Stop-Process -Force (or without -Force).

That works in 99% of cases. Unfortunately, sometimes it don't. After executing the command I check whether the process is killed and get:

PS D:\_prj> Get-Process someapp*

Handles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id  SI ProcessName
-------  ------    -----      ----- -----   ------     --  -- -----------
    425      46    47052      60364   189     0,88  17316   2 someappHandler

Why? What's the PS solution to such problem? It may be worth noting that killing it via Task Manager works just fine.

Leśny Rumcajs

Posted 2016-03-07T09:35:21.510

Reputation: 300

Why aren't you using cmd and with taskkill? – mpboom – 2016-03-07T10:41:16.603

5Because I marked this question as a Powershell problem. Just like C questions don't expect Python answers. – Leśny Rumcajs – 2016-03-07T10:48:53.927

Does "with admin rights" mean that your PowerShell session is properly elevated (window title = "Administrator: Windows PowerShell")? – megamorf – 2016-03-08T14:12:43.467

Yes, "Administrator: Windows Powershell" is the exact title of the PS window. – Leśny Rumcajs – 2016-03-08T14:33:54.117

I've had the same issue. Usually this meant another process or service was using the process I was attempting to kill. The best way to get around this is to run the Stop-Process Silently and then doing a process status check. – bbatman – 2016-03-15T17:35:36.163

No answers