Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to display a process's command line (including any arguments) from the command line itself. In other words, I want to show the "Command Line" column in the Task Manager but from a command line. Is this possible?

For example, the output might look something like

C:\java\bin\java.exe -Dhttp.proxyHost=http://localproxy -Dport=8331
share|improve this question

2 Answers 2

up vote 3 down vote accepted

You can use Microsoft's official Process Explorer. It can do exactly this and has many many more useful features.

share|improve this answer

Wmic.exe will show you what you are looking for:

wmic path win32_process get name, commandline > commandline.txt

Java looks like:

"C:\Program Files\Java\jre6\bin\jqs.exe" -service -config "C:\Program Files\Java\jre6\lib\deploy\jqs\jqs.conf"

For all available attributes, try:

wmic path win32_process get /format:list
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.