Using grep and kill on Windows!

If you are heavy Linux user, and you love “grep” command, and you need use this on Windows command the “findstr” command is right for you.

For example we want to search what processes are actually run in Windows, and we want to list only processes that we looking for, open Windows Command Terminal CMD
and type below command

C:\>tasklist /svc | findstr /spin "string we search"

It is very useful when we want to search fore some process we want to kill from Windows CLI

After we list the processes we can execute command to display our process PID:

taskkill /IM ProcessName.exe

And now using atribute /F – force, we can kill that process:

taskkill /F /PID 123