Kill process by ParentProcessID
问题 I want to kill a running process by its ParentProcessID. I want to do it like you can do it in the commandline: wmic process where parentprocessid= 3008 terminate But now the thing is, in PowerShell I've the ParentProcessID as a variable like this: $p = 3008 And now I would like to kill the process by the varibale $p but this doesn't work: wmic process where parentprocessid= $p terminate How can I kill a process by its ParentProcessID, if I have the ParentProcessID stored in a variable? 回答1: