Tuesday, May 17, 2016

windows server 2003 - List processes with their launching command line



I'm looking for a Windows feature or third-party tool that can produce a list of active processes (as in the task manager) with the command line used to start each process.



e.g. if I launch "php.exe -q script.php" in a command line, during the execution of my process, I'd like to see this command in the list and not only "php.exe"



Tasklist, process explorer, taskinfo... can't give this information and/or make it available in a text format. Do you know if such tools/features exist?



Thanks


Answer




wmic process list full /format:htable > wmic_task_list.html


or



wmic process get Name,ProcessId,CommandLine /format:table > wmic_task_list.txt


See wmic process list /format /? or wmic process get /format /? for a list of valid output formats.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...