Killing a process which runs with a specific commandline using taskkill command

0

The process I'm trying to kill is:

rundll32.exe aeinv.dll,UpdateSoftwareInventory

However, I don't want to kill all instances of rundll32.exe, only the ones started with the "aeinv.dll,UpdateSoftwareInventory" commandline.

user660611

Posted 2017-02-27T20:49:20.477

Reputation:

Answers

1

I'd do the following: In PowerShell use the command: Get-WmiObject Win32_Process -Filter "name = 'rundll32.exe'" | Select-Object CommandLine,ProcessId

This will give you back a list of all of the rundll32.exe processes running along with their CLI arguments.

Then use the ProcessID of that particular one to kill it, whether via Task Manager, Stop-Process -Id <ProcessID> in PowerShell, or taskkill -PID <ProcessID> in an administrative command prompt.

Hope that helps.

Ahren Bader-Jarvis

Posted 2017-02-27T20:49:20.477

Reputation: 11

It doesn't return anything for commandline, only gives me processid – None – 2017-02-27T21:23:39.460

Are you running Powershell/Powershell ISE as Admin? – Ahren Bader-Jarvis – 2017-02-28T17:31:56.000