Stop all processes with the same name

User PowerShell to stop all processes with the same name

I have a utility server that I connect to frequently and for some reason or other, that I haven’t had time to investigate yet, a certain Citrix related process launches and re-launches. Over the course of weeks there can be 30+ instances of this process running under my user account.

The specific process doesn’t take up much CPU or RAM, but it is annoying and if I someone else is using the server for real work, then those resources could be better allocated.

Task Manager takes too much clicking around to clean them all up, so I do a quick kick with PowerShell. In an Elevated PowerShell session: Get-Process | Where {$_.ProcessName -like “SelfServicePlugin”} | Stop-Process

You can change out SelfServicePlugin for anything else you need. I suggest testing before you run this somewhere important. A simple test is: Get-Process | Where {$_.ProcessName -like “SelfServicePlugin”} | Stop-Process -WhatIf Then you can quickly compare the PIDs with Task Manager.

Caveat Emptor: This will stop all process that match the name you provide. If another user has the same process running for them, it will get stopped too. You can use the Property SessionID to filter for processes running under a certain login, but I will leave figuring that out as an activity for the curious.

comments powered by Disqus