PowerTip: Use PowerShell to Find Command Line of Processes

The Scripting Guys

Dr Scripto

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.

The Scripting Guys
Dr Scripto

Follow Dr Scripto   

No Comments.