Windows Platform

Query and kill a process on a remote computer using PowerShell

Kill a process with PowerShell

Who never had the situation,  for example, one or more processes of a user must be stopped. Currently, this can be done remotely by an administrator without having to switch to the user’s computer.


First, we will use Get-Process cmd to list the processes that are running on the local computer.


Also, we will use Get-WmiObject to Gets instances of Windows Management Instrumentation (WMI) classes or information about the available classes.


However, the execution of the following script will stop “Notepad.exe” processes for user.

How to see a list of running Processes

So, we will assign the remote computer value to the variable “ComputerNameSelect”

$computerNameSelect = “”
Get-Process -computerName $ComputerNameSelect


Then, we will assign the remote process name to the variable “KillProcess”

$KillProcess = “Notepad.exe”

Stop processes with PowerShell

Get-WmiObject Win32_Process -ComputerName $ComputerNameSelect | ?{ $_.ProcessName -match $KillProcess }).Terminate()


Powershell Find licence key,List program,Unistall a program,Show process,Kill process