January 15th, 2016

PowerTip: Use PowerShell to Find Command Line of Processes

Doctor Scripto
Scripter

Summary: Learn how to use Windows PowerShell to find the command line of processes.

Hey, Scripting Guy! Question How can I find the command line that was used to launch a process that is running on my system?

Hey, Scripting Guy! Answer Use the Get-CimInstance cmdlet, the Win32_Process WMI class, and the CommandLine property:

gcim win32_process | select commandline

Note  gcim is an alias for Get-CimInstance.

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback