Home » How To » How to Start & Stop Process from Windows Command Line

Windows: How To Start & Stop Processes via Command Prompt / PowerShell

Want to start, stop, or kill a process using Command Prompt or PowerShell? This tutorial shows you how and explains the commands.

While most Windows users rarely need to manage processes manually, there will be situations where it is necessary. For instance, you might need to force-stop a frozen process or kill one that’s consuming too many system resources. Alternatively, you might have specific programs you only need to launch occasionally via command line. Whatever your specific use case is, you can easily start, stop, or kill any process in Windows using the Command Prompt and PowerShell.

These methods are particularly helpful when creating custom scripts, when the task manager is unresponsive, and to create desktop shortcuts.

This guide will walk you through how to start a process and stop a process (kill process) using Command Prompt and PowerShell in Windows 11 and Windows 10.

Before You Start

Some processes, such as system-level services, system processes, and processes belonging to other users require admin rights to start and stop.

Starting and Stopping Processes Using Command Prompt

Starting a Process

  1. Open the Start menu by clicking the “Windows” icon on the taskbar.
  2. Search for “Command Prompt” and click “Open“.
  3. Run the start "C:\path\to\process.exe" while replacing the dummy path between quotes with the actual path to the process.
    • Programs in the system PATH, like “explorer.exe” or “notepad.exe”, don’t require a full path. For example, to start Windows Explorer, you can type start explorer.exe.
  4. Press “Enter” to run the command.
  5. The above action starts the process immediately.
  6. You can close the Command Prompt window after running the command.

Note: If a process requires elevated permissions, you need to open Command Prompt as admin. To do that, select “Run as administrator” in step 2.

start process from command prompt

Stopping or Killing a Process

Let’s say your File Explorer is frozen and you have a difficult time opening the Task Manager. In that case, you can use Command Prompt to terminate the process (stop process). Here’s how.

  1. Open the Start menu by pressing the “Windows” key on your keyboard.
  2. Search for “Command Prompt” and select “Open“.
  3. Run tasklist to list all the running processes.
  4. It shows the process name and process ID under the “Image Name” and “PID” columns respectively.
  5. Note down the Image Name and PID of the process you want to kill or stop.
  6. Run one of the following commands, replacing the placeholder with the actual value you noted:
    • Terminate using Image Name: taskkill /F /im process_name.exe
      • (Example: taskkill /F /im explorer.exe)
        kill process via Command Prompt using image name
    • Terminate using Process ID (PID): taskkill /F /PID pid_number
      • (Example: taskkill /F /PID 1234)
        kill process via Command Prompt using process ID
  7. The above command instantly kills the process.
  8. You can close the Command Prompt window after running the command.

Note: If a process requires elevated permissions, you need to open Command Prompt as admin. To do that, select “Run as administrator” in step 2.

Command Flag Explanation

  • /im: Specifies that you are targeting the process by its Image Name (process name)
  • /PID: Specifies that you are targeting the process by its Process ID.
  • /F: Forcefully terminates the process. While you can omit this flag, doing so only attempts a graceful shutdown of the process and may not work if the target process is frozen or unresponsive.

Starting and Stopping Processes Using PowerShell

Similar to Command Prompt, PowerShell has specific cmdlets that allow you to start and stop/kill a process.

Starting a Process

  1. Open the Start menu by clicking the “Windows” icon on the taskbar.
  2. Search for “PowerShell” and click “Open“.
  3. Run the Start-Process "C:\path\to\process.exe" while replacing the dummy path between quotes with the actual path to the process.
    • Programs in the system PATH, like “explorer.exe” or “notepad.exe”, don’t require a full path. For example, to start Windows Explorer, you can type Start-Process explorer.exe.
      Start a process using PowerShell
  4. Press “Enter” to run the command.
  5. The above action starts the process immediately.
  6. You can close the PowerShell window after running the command.

Note: If a process requires elevated permissions, you need to open PowerShell as admin. To do that, select “Run as administrator” in step 2.

Stopping or Killing a Process

Just like with Command Prompt, before you can kill a process, you need to know its name or ID. In PowerShell, you can get the ID of any process using the Get-Process cmdlet and then kill it using the Stop-Process cmdlet. Here’s how.

  1. Open the Start menu by clicking the “Windows” icon on the taskbar.
  2. Search for “PowerShell” and click “Open“.
  3. In the PowerShell window, run the Get-Process cmdlet to list all the running processes. find process ID in PowerShell using Get-Process cmd
  4. You can find the process IDs under the “ID” column. Note down the process ID of the process you want to terminate.
  5. Run Stop-Process -Force -ID process_id while replacing “process_id” with the actual ID of the process you want to kill.
    • (Example: Stop-Process -Force -ID 1234)
  6. The above command instantly kills the process.
  7. You can close the PowerShell window after running the command.

Note: If a process requires elevated permissions, you need to open PowerShell as admin. To do that, select “Run as administrator” in step 2.

Command Flag Explanation

  • -Force: Forcefully terminates the process. While you can omit this flag, doing so only attempts a graceful shutdown of the process and may not work if the target process is frozen or unresponsive.
  • -ID: Specifies that you are targeting the process by its Process ID.

Wrapping Up — Starting and Killing Processes Using Command Prompt and PowerShell

As you can see, whether you want to use Command Prompt or PowerShell, starting, stopping, and killing any process is fairly simple. Keep in mind that system processes, system-level services, and processes started by other users require you to have administrator rights to kill them. Additionally, if a process is frozen and unresponsive, you have to use /F in Command Prompt and -Force in PowerShell to forcefully terminate the target process.

If you have any questions or need help, comment below. I’ll be happy to assist.

Leave a Comment

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