Remotely Killing Processes on Windows Networks

Time for a System’s Administrator trick that I’ve found to be extremely useful over the years. Sometimes you’ve got a program that’s stuck on a machine in an office many miles away and you just need to kill the process to fix the issue. If all your machines are connected, most of the time you can do that through WMI procedures.

There are several ways to do this. I’ll list two command line methods, and a GUI method  here as they are the least obtrusive and easiest to come by.

You might check my article on Remotely Listing Processes on Windows Networks as it will clear Step 1 in each of these up.

Killing Processes Remotely With taskkill

Taskkill is a built-in utility in Windows. It should be available in any version after Windows XP but at very least I’ve seen it in Windows 7. This is good because almost any machine will have this. It’s a bit tougher to use than the other method I’m going to tell you about.

Step 1: Determine what the name of the task is you need to kill. This is usually just the name of the executable of the program you’re trying to terminate, like winword.exe, chrome.exe, notepad.exe, or explorer.exe (don’t, seriously).

Step 2: Open the command prompt in Administrator mode. You do this by opening your start menu, typing cmd, and right clicking the “CMD” or “Command Prompt” icon and clicking “Run as Administrator”.

Step 3: Type this:

taskkill /s remotecomputername /u domainname\username /p password /IM processname

Hit enter.

It should give you a success message.

taskkill

Note: You can find a full reference guide to Taskkill here: Taskkill.

Killing Processes Remotely with Pstools

This is a set of tools I’ve kept in my Sysadmin kit for a long, long time. They’re made by Sysinternals and you can download them free from Microsoft, and they do all kinds of neat things. The relevant tool here is “Pskill”. Personally I think it’s a little easier to use than Taskkill and a bit more versatile. It’s better for scripting as well.

First off, go ahead download the tools and extract them to a folder somewhere on your computer, or put them on a Thumb Drive.

Note: You can download and get the reference guide for Pstools here: Pstools
Note: You have to hit an “I agree” screen the first time you use them on any computer.

Step 1: Determine what the name of the task is you need to kill. This is usually just the name of the executable of the program you’re trying to terminate, like winword.exe, chrome.exe, notepad.exe, or explorer.exe (don’t, seriously).

Step 2: Open the command prompt in Administrator mode. You do this by opening your start menu, typing cmd, and right clicking the “CMD” or “Command Prompt” icon and clicking “Run as Administrator”. Then navigate to the folder you placed the PStools in. I typically just put them on the C:\ drive on my machine, in a PSTools folder. So you’d type this:

cd \pstools

Step 3: Type this:

Pskill  \\remotecomputername -u username -p password processtokill

Hit enter

It will run through a more complex set of steps than Taskkill but the outcome is pretty similar.

Pskill

A GUI Method for Killing Processes Remotely

With almost anything in Windows there’s a GUI method for doing things remotely on other computers on your network. I could not find an easy built-in way to do this in Windows.

I did however find a piece of Freeware that’s available for personal non-commercial use that you can use. It’s called Remote Process Explorer by Lizard Systems. If your environment is educational, non-profit, personal, or non-business you can use it for free. The commercial license is pretty reasonable at $99 though.

I played with it for a bit to make sure it works and it’s a pretty solid piece of software that does what it says, and has a few extra features like auto discovery of computers, and some basic network and monitoring tools built-in too. It’s not the only one like it, but it’s one of the few out there that isn’t outright shareware, or part of a bigger suite.

I’m not going to put any instructions on how to use it here, because I don’t use it myself at the moment. I felt that I needed to include a GUI option for those that don’t like the Command Line.

One Reply to “Remotely Killing Processes on Windows Networks”

Leave a Reply