---
title: "How to Kill a Windows Process on a Remote System"
description: "In this tutorial, learn how to kill a Windows process using native utilities, third-party utilities, and PowerShell!"
canonical: "https://adamtheautomator.com/how-to-kill-a-windows-process/"
---

# How to Kill a Windows Process on a Remote System

> In this tutorial, learn how to kill a Windows process using native utilities, third-party utilities, and PowerShell!

Source: https://adamtheautomator.com/how-to-kill-a-windows-process/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![How to Kill a Windows Process on a Remote System](https://adamtheautomator.com/wp-content/uploads/2021/09/How-to-Kill-a-Windows-Process-on-a-Remote-System.jpg)

# How to Kill a Windows Process on a Remote System

[![](https://secure.gravatar.com/avatar/75fa5f572fb085a46bfff406309882e0848db4770557901e8de897b3f7d05a7a?s=192&d=mm&r=g)Nick Rimmer](https://adamtheautomator.com/author/nick/)28 September 20216 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[PowerShell](/tag/powershell/)[Windows 10](/tag/windows-10/)

Table of Contents

*   [Prerequisites](#prerequisites)
*   [Querying Remote Windows Process with Tasklist](#querying-remote-windows-process-with-tasklist)
*   [Querying Remote Windows Process with PSList](#querying-remote-windows-process-with-pslist)
*   [Killing Processes By Process Name with PSKill](#killing-processes-by-process-name-with-pskill)
*   [Killing Processes By Process ID with PSKill](#killing-processes-by-process-id-with-pskill)
*   [Killing Remote Windows Processes with TaskKill by Name](#killing-remote-windows-processes-with-taskkill-by-name)
*   [Kill Process by Name](#kill-process-by-name)
*   [Killing Remote Windows Processes with TaskKill by PID](#killing-remote-windows-processes-with-taskkill-by-pid)
*   [Killing a Remote Windows Process with PowerShell](#killing-a-remote-windows-process-with-powershell)
*   [Conclusion](#conclusion)

Perhaps you’re working happily on a remote Windows server, then find a process that runs awry using up valuable CPU cycles. What do you do? Kill it!

In this tutorial, you will learn how to kill a Windows process using native utilities, third-party utilities, and PowerShell. You will first learn how to examine the running processes in Windows and then kill running processes.

## Prerequisites

If you’d like to follow along with the steps in this tutorial, be sure you have the following ahead of time:

*   A Windows PC – All demos in this tutorial will use Windows 10, but Windows 7+ will work also.
*   A Windows Server or another Windows desktop to use as your target for killing the remote tasks. This tutorial uses a standalone Windows Server 2016 as the remote server.
*   The [Sysinternals Suite](https://download.sysinternals.com/files/SysinternalsSuite.zip) from Microsoft.
*   Windows PowerShell 5 or greater. This tutorial uses PowerShell v7.1.3

## Querying Remote Windows Process with Tasklist

Since Windows XP, there has been a helpful tool called [tasklist](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/tasklist). Tasklist is a handy tool that queries processes on remote computers. Before you can kill a process, you must first discover them!

Open a PowerShell session or command prompt on your desktop and type in the following command to display all the running processes on your remote computer.

The command below queries a remote computer (`/S`) authenticating the connection with the administrator username (`/U`) and password (`/P`).

```bash
tasklist /S WIN-BANGJIEFNOC.local.net /U administrator /P password
```

You’ll notice below that the **Session Name** does not appear. Since you’re running `tasklist` on a remote computer, `tasklist` does not provide the **Session Name**.

![list of processes on a remote server](https://adamtheautomator.com/wp-content/uploads/2021/09/image-216.png)

list of processes on a remote server

Perhaps you prefer only to list a single process. Not a problem. To do that, specify the `/FI` parameter. The `/FI` parameter accepts [a query](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/tasklist) that is passed to the `tasklist` to filter out specific processes.

```bash
tasklist /S WIN-BANGJIEFNOC.local.net /fi "imagename eq notepad.exe" /U administrator /P 'password'
```

![The output of tasklist showing a specific process](https://adamtheautomator.com/wp-content/uploads/2021/09/image-217.png)

The output of tasklist showing a specific process

## Querying Remote Windows Process with PSList

Another tool to view running processes is [PSList](https://docs.microsoft.com/en-us/sysinternals/downloads/pslist), and this utility is part of the [Sysinternals Suite](https://docs.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite). This suite of tools has been around for many years and was created by Mark Russinovich, CTO of Azure!

Let’s get started on how you can view running processes on a remote computer.

1\. Open a PowerShell session or command prompt on your desktop and change the directory to where you extracted the Sysinternal Suite.

2\. In your PowerShell session, run the following command to display the running processes on the remote computer and associated [CPU](https://www.sciencedirect.com/topics/engineering/central-processing-unit) usage in real-time.

The command below runs `pslist` to query all remote Windows processes on the `WIN-BANGJIEFNOC` computer authenticating the `Administrator` username (`-u`) and password (`-p`).

The command uses the `-s` switch turns `pslist` into “task manager mode” that repeatedly updates the list.

> _If it’s the first time you have used a Sysinternals tool, a banner may appear that asks you to accept the [EULA](https://www.microsoft.com/en-us/windowsvirtualdesktop/eula); click on OK._

```bash
.\pslist \\WIN-BANGJIEFNOC.local.net -u Administrator -p 'password' -s
```

You now see the following output from running that command; for this article, you are concerned with 3 of these values. As shown below.

*   **Name**: The name of the process.
*   **Pid**: Process Identifier, a critical value used in this tutorial, the PID number can be used to kill a remote process. It’s the numerical id assigned to a [process](https://docs.microsoft.com/en-us/windows/win32/procthread/processes-and-threads).
*   **CPU**: This shows in near real-time the utilization of your overall available CPU.

The other values are memory-related and beyond the scope of this article.

![Output in real-time of pslist](https://adamtheautomator.com/wp-content/uploads/2021/09/image-218.png)

Output in real-time of pslist

3\. Since step two used the `-s` switch, hit Ctrl-C to quit `pslist` to get back to the console.

> _Narrow down the list of processes returned by using the `-e` switch followed by the process name, e.g., `-e Winlogon`._

## Killing Processes By Process Name with PSKill

Once you know how to find remote processes, let’s now dive into how to kill them. To start, let’s cover the [pskill](https://docs.microsoft.com/en-us/sysinternals/downloads/pskill) [](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/taskkill)utility. First, learn how to kill processes by process name.

1\. Ensure you have a process you can kill on your remote server. This tutorial will use the notepad process.

2\. Open a PowerShell session or command prompt on your local desktop and change the directory to where you extracted the Sysinternal Suite and run the following command. You can see the syntax for `pskill` is similar to `pslist`.

```bash
.\pskill.Exe \\WIN-BANGJIEFNOC.local.net -u administrator -p 'password' -e notepad.exe
```

![Output of pskill](https://adamtheautomator.com/wp-content/uploads/2021/09/image-219.png)

Output of pskill

3\. Now, run `pslist`, as explained in the previous section, to confirm the process is indeed stopped.

```bash
.\pslist \\WIN-BANGJIEFNOC.local.net -u Administrator -p 'password' -e notepad.exe
```

![Output of pslist](https://adamtheautomator.com/wp-content/uploads/2021/09/image-220.png)

Output of pslist

### Killing Processes By Process ID with PSKill

Killing the process by name might be good enough for your needs if only a single instance of that process is running or you want to kill all processes with that name. What if you’re going to kill a particular instance of a running process? The following steps will demonstrate this.

1\. On your remote server, open Notepad twice; you will kill one of these processes in this demonstration; you can of course, substitute other processes.

2\. Run the following command taking note of one of the **Pid**‘s as shown below; you need that for the next step.

```bash
.\pslist \\WIN-BANGJIEFNOC.local.net -u Administrator -p password -e notepad
```

![Using pslist to list PID's of Notepad](https://adamtheautomator.com/wp-content/uploads/2021/09/image-221.png)

Using pslist to list PID’s of Notepad

3\. Using the PID, now run `pskill`, providing the PID as the last argument.

```bash
.\pskill.Exe \\WIN-BANGJIEFNOC.local.net -u administrator -p password 1984
```

![The output of pskill for a particular PID](https://adamtheautomator.com/wp-content/uploads/2021/09/image-222.png)

The output of pskill for a particular PID

4\. Finally, check that you still have one instance of Notepad running by rerunning `pslist`. You should now only see a single instance of Notepad running.

![Output of pslist](https://adamtheautomator.com/wp-content/uploads/2021/09/image-223.png)

Output of pslist

## Killing Remote Windows Processes with TaskKill by Name

The [taskkill](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/taskkill) utility is native to Windows and includes further command-line options for restarting processes by username and application name. Let’s get started and kill Notepad again!

### Kill Process by Name

1\. On your remote server, open Notepad; Notepad is the process you will kill in this demonstration; you can, of course, substitute another process.

2\. Open a PowerShell session or command prompt on your desktop. Typing the following command will kill notepad.exe

```bash
taskkill /S WIN-BANGJIEFNOC.local.net /you administrator /p password /IM notepad.exe
```

The output is shown below:

**/IM** is the parameter for Image; in this case, it is **notepad.exe**

![The output of taskkill command](https://adamtheautomator.com/wp-content/uploads/2021/09/image-225.png)

The output of taskkill command

3\. To confirm the process is stopped, run `tasklist`. You should now see no tasks are matching that filter.

```bash
tasklist /S WIN-BANGJIEFNOC.local.net /fi "imagename eq notepad.exe" /U administrator /P 'password'
```

![Output of tasklist using imagename](https://adamtheautomator.com/wp-content/uploads/2021/09/image-226.png)

Output of tasklist using imagename

## Killing Remote Windows Processes with TaskKill by PID

Killing a process with `taskkill` using a PID isn’t much different than using the process name. But, since you can’t use the name, you’ll first need to find the PID and then pass that to `taskkill`.

Assuming you Notepad running on your remote Windows host:

1\. Run `tasklist` as shown below to find the PID of the Notepad process. Take note of one of the **PID’s** as shown below; you need that for the next step.

```bash
tasklist /S WIN-BANGJIEFNOC.local.net /fi "imagename eq notepad.exe" /U administrator /P 'password'
```

![the output of tasklist to view PIDS](https://adamtheautomator.com/wp-content/uploads/2021/09/image-227.png)

the output of tasklist to view PIDS

2\. Now, run `taskkill` providing the PID as the last argument.

```bash
taskkill /S WIN-BANGJIEFNOC.local.net /u administrator /p 'password' /PID 3776
```

![The output of taskkill specifying a particular PID](https://adamtheautomator.com/wp-content/uploads/2021/09/image-228.png)

The output of taskkill specifying a particular PID

3\. Finally, run `tasklist` to confirm the process is stopped.

![Output of tasklist](https://adamtheautomator.com/wp-content/uploads/2021/09/image-229.png)

Output of tasklist

## Killing a Remote Windows Process with PowerShell

PowerShell gives you a couple of options for killing remote processes; the first cmdlet [`Stop-Process`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/stop-process?view=powershell-7.1) cannot natively kill a remote process, as it does not have an option to specify a computer name. But, you can get around this issue by running `Stop-Process` remotely via [PowerShell Remoting](https://adamtheautomator.com/psremoting/).

Related:[PowerShell Remoting: The Ultimate Guide](https://adamtheautomator.com/psremoting/)

1\. If your host and remote server are not in an Active Directory domain, first provide a username and password, creating a PSCredential object.

Related:[Using the PowerShell Get-Credential Cmdlet and all things credentials](https://adamtheautomator.com/powershell-get-credential/)

```bash
$credentials = Get-Credential
```

![Setting up credentials](https://adamtheautomator.com/wp-content/uploads/2021/09/image-230.png)

Setting up credentials

2\. Next, since the tutorial will use SSL to connect to the remote computer and use a self-signed certificate, create a PSSessionOption that will skip the certificate check for a trusted certificate authority.

```bash
$PSSessionOption = New-PSSessionOption -SkipCACheck
```

3\. Now, connect to the server with the `Enter-PSSession` command, which establishes an interactive session to the remote server.

The command below is connecting to the `WIN-BANGJIEFNOC.local.net` computer using the username and password provided above (`Credential`), skipping the certification authority check (`SessionOption`), and connecting via SSL (`UseSSL`).

```powershell
Enter-PSSession -ComputerName WIN-BANGJIEFNOC.local.net -Credential $credentials -SessionOption $PSSessionOption -UseSSL
```

![Using Enter-PsSession for an interactive session](https://adamtheautomator.com/wp-content/uploads/2021/09/image-231.png)

Using Enter-PsSession for an interactive session

4\. Once you’re connected to the remote host, check the process you want to kill by running `Get-Process`. In this case, you’ll see the `notepad` process.

```bash
Get-Process -ProcessName Notepad
```

![Output of Get-Process](https://adamtheautomator.com/wp-content/uploads/2021/09/image-232.png)

Output of Get-Process

5\. To kill this process, run `Stop-Process`, as shown below.

```bash
Stop-Process -ProcessName Notepad
```

6\. Finally, confirm you’ve killed the process by rerunning `Get-Process`, and you should receive an error message.

![Checking for Notepad as a running process](https://adamtheautomator.com/wp-content/uploads/2021/09/image-233.png)

Checking for Notepad as a running process

> _If you’d like to stop a remote Windows process non-interactively, use the [`Invoke-Command` command](https://adamtheautomator.com/invoke-command/) [](https://adamtheautomator.com/invoke-command/)using the following parameters: `Invoke-Command -ComputerName WIN-BANGJIEFNOC.local.net -Credential $credentials -ScriptBlock {Stop-Process -ProcessName notepad} -UseSSL`. Encapsulating the `Stop-Proces` command in the `ScriptBlock` parameter sends the command to the remote host._

## Conclusion

You have learned about different methods of killing remote processes and how to overcome situations where network firewall rules might stop utilities from working correctly; this tutorial might have also helped you fix Windows.

The utilities you learned about are potent tools; use with care!

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fhow-to-kill-a-windows-process%2F&text=How%20to%20Kill%20a%20Windows%20Process%20on%20a%20Remote%20System)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fhow-to-kill-a-windows-process%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fhow-to-kill-a-windows-process%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2024/01/OpenSSL-on-Windows-10.jpg)

### [Master OpenSSL on Windows 10: A Guide to Powerful Security](/openssl-windows-10/)

Master OpenSSL on Windows 10 with PowerShell, from installation to certificate signing requests and conversions.

![](https://adamtheautomator.com/wp-content/uploads/2019/06/photo-1516382799247-87df95d790b7.jpg)

### [Finding PowerShell Last Logon by User Logon Event ID](/user-logon-event-id/)

Learn how to build a user activity PowerShell script that will pull information from the Windows event log for a local computer.

![](https://adamtheautomator.com/wp-content/uploads/2021/02/How-to-Create-Checksums-in-Windows-Built-in-and-Third-Party-Tools.jpg)

### [Create Checksum in Windows and Verify File Integrity](/checksum-windows/)

Learn in this in-depth article that covers nearly all the ways to generate checksums in Windows using built-in and third-party tools.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
