On windows , you can use wmic to list all process running by type process in the wmic console.
Also you can run some filter, like listing all notepad.exe
procecss where name=”notepad.exe” list brief
if we don’t know which field are available to get for this Process object, try get /?
so we can call process where name=”notepad.exe” get commandline, name, processid
if we want to kill those processes, we can call call /? to see available actions
So we can call terninate method to kill all notepad.exe
then all process are gone,
we can do this same thing on service,
to export all the service you can run wmic /output:file service where state=”running” /format:htable
No comments:
Post a Comment