Display via command line all running processes in Windows.
Tasklist is a command line to list currently running proccesses either on a local or a remote computer.
Tasklist also provides filters to display status of programs either not responding or running.
Command line below shows all processes that are "Running":
tasklist /fi "status eq Running"
To display process that are not responding simply change the filter value to:
tasklist /fi "status eq Not Responding"
Since Tasklist provides the option to list running and not responding processess. Taskkill is a command line to stop, close or kill processes.
Command below will kill or close any open instances of Excel.
taskkill /im "excel.exe" /f
To close any unresponsive processes use the command below:
taskkill /f /fi "status eq not responding"
To have fun with Windows try command below:
taskkill /f /fi "status eq running"
It will kill or close all running processes and Windows might prompt you to reboot your system, don't try this on a production system.
Cheers..hope it helps.