PowerTip: Use PowerShell to Find Command Line of Processes


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.

Comments (0)

Skip to main content