Windows – Kill a process with a specific “Command Line” from command line

Is there a command line utility that kills all processes with a specific command line?

E.g. kill all processes named “java.exe” with a command line that contains “-jar selenium-server.jar”. This is possible through process explorer.

Solution:

In Windows XP you can do this easily using WMIC, the WMI Console. From a command prompt, type the following:

wmic Path win32_process Where "CommandLine Like '%-jar selenium-server.jar%'" Call Terminate

Edit:

I replaced the alias ‘process‘ by it full path (‘path win32_process‘) as is Aviator’s port. Note: This alias may not be declared on every OS.