How to end unresponsive processes that can't be taskkilled in Windows?

How do I kill an unresponsive process or task in Windows when it becomes completely unresponsive (window becomes a ligt grey, cursor a rotating blue ring)?

  • Clicking [X] or trying to end process in taskmgr has no effect [status is unresponsive].
  • Task can't be killed using Process Explorer [procexp] or with any of the following:
    TaskKill /f /pid %pid%
    
    TaskKill /f /im %exec.exe%
    
    Stop-Process -Force -Name $name
    

Solution 1:

To end unkillable processes, use WMIC [Windows Management Instrumentation Console] in cmd or powershell, replace the variables with the PID/name of the process to kill:

  • cmd (variable: %pid%):
    WMIC Process where ProcessID=%pid% delete
    
  • powershell (variable: ${name}):
    WMIC Process where Name="${name}.exe" delete