Killing Processes Softly with PowerShell

This is a quick tip on how to obliterate processes that are running in the background on a Windows machine.

In my case, I was working on a project which, when it ended abruptly, didn’t clean up an Excel session that was running in the background. There was no fortuitous time to do this so ultimately, I found myself zipping through the Task Manager processes, then right-clicking on the process, before ending it. Not a huge problem, but there is a much quicker way using a simple PowerShell command, but don’t blink, because here it is:

Place this inside a .ps1 file and change whatever process you want to end within the quotes. As you can see, wildcards are permitted which is great, but do be careful.

User:1 Process: 0


Written by Stephen Moon
email: stephen at

Hey! Did you enjoy reading this? If you did and would like an email when I add new content, just subscribe to my list. You can unsubscribe at any time.

Leave a Reply

Your email address will not be published. Required fields are marked *