list all processes and their command-line parameters in windows

trying to list all processes and their command-line parameters in windows?

here you go! type this in a cmd prompt:

WMIC /OUTPUT:C:\processes-with-command-line-params.txt PROCESS get Caption,Commandline,Processid

or

WMIC /OUTPUT:C:\processes-with-command-line-params.txt path win32_process get Caption,Processid,Commandline

what you’re loking for will be in this file –> C:\ProcessList.txt

i’ve also tried this on a Windows 2008 R2 server and for some reason gotten an “Invalid Global Switch” error and I couldn’t figure out why. this might help you to just set the output to CLIPBOARD and then just paste it to a file. For some reason it allowed the command to run when output was CLIPBOARD:

WMIC /OUTPUT:CLIPBOARD PROCESS get Caption,Commandline,Processid

want to know more about the WMIC command? here’s the microsoft technet article

Previous
Previous

rm is not recognized as an internal or external – OHS startComponent.cmd and stopComponent.cmd

Next
Next

OPatch error: “Inventory load failed… OPatch cannot load inventory for the given Oracle Home