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.

Remotely Listing Processes in A Windows Network

Managing processes and tasks on a Windows network remotely is a big part of Systems Administration. Some companies and organizations have these great Desktop Management tools and others don’t. Most of those tools though just use functionality that’s built into Windows and make it easier to work with.

Sometimes there are situations where those tools just flat refuse to work on remote machines as well, for whatever reason. Here are a few tools that might help solve that problem.

Two of these are command line, and the other is a GUI tool I found that seems to work pretty well. Personally I’m a big fan of the command line since it is easier to script.

If you’re needing to kill a process remotely check out my related article How To Kill Processes Remotely on a Windows Network.

 

Using Tasklist to List Processes Remotely

Microsoft has provided a tool called Tasklist since Windows XP or so to list running processes on machines. It’s fairly easy to use and already included with Windows.

Step 1: Open Command Prompt as an administrator. To do this, click your start button, type “cmd” and right click on the “Cmd” or “Command Prompt” icon and click “Run as Administrator. If you’re running Windows XP this is not needed.

Step 2: Type this:

tasklist /s remotecomputername /u domain\user /p password

You’ll get a list of all the running processes. This can help you determine the name of a stuck process, the PID and any of a number of other kids of information.

Note: A full reference for this tool is found here: Taskkill

Using Pstools to List Processes Remotely

I’ve used pstools for a long time. They’re pretty versatile and can be used in batch scripts and task easier than the built-in tools. Hopefully they’ll be supported for a long time to come. I highly recommend downloading them. The one drawback is the “I agree” screen you have to click on the first time you use them.

Step 1: Open Command Prompt as an administrator. To do this, click your start button, type “cmd” and right-click on the “Cmd” or “Command Prompt” icon and click “Run as Administrator. If you’re running Windows XP this is not needed.

Step 2: Type this:

pslist \\remotecomputername -u domain\user -p password

Same as tasklist, you’ll get a readout of all running processes on the remote computer. You get a bit more information too.

Note: A full reference as well as download for this tool is found here: Pstools

GUI Method for Listing Processes Remotely

There are a lot of tools out there in various software suites that will do this. If you’re looking for a standalone tool, one that I found is Remote Process Explorer by Lizard Systems. It covers both listing and killing processes in remote computers.

I don’t use this tool, but I have tested it a bit and it’s pretty solid. I am just providing a GUI method for doing this as I couldn’t find a built-in method for doing this in Windows. Check it out. The software is freeware for non-commercial purposes, and $99 for a commercial license, so it’s pretty fair for everything it does.

Notes: This post assumes you are using at least Windows 7, though most of these tools will run just fine on earlier versions of Windows.