Monday, March 24, 2014

WMIC Tips, Export format and get hint about callable Actions

On windows , you can use wmic to list all process running by type process in the wmic console.
image

Also you can run some filter, like listing all  notepad.exe
procecss where name=”notepad.exe” list brief

image

if we don’t know which field are available to get for this Process object, try get /?

image

so we can call process where name=”notepad.exe” get commandline, name, processid

image

if we want to kill those processes, we can call call /? to see available actions

image

So we can call terninate method to kill all notepad.exe

image

then all process are gone,

we can do this same thing on service,

image

to export all the service you can run wmic /output:file  service where state=”running” /format:htable

image

image

No comments:

 
Locations of visitors to this page