Get the command line of a running process via powershell

If you need to get the command line of a running process you can use powershell:

gwmi win32_process -filter "name='vmware-vmx.exe'" | where-object {$_.commandline -like "*ex02*"} | select commandline, processid | fl

The above will get the commandline and processid of the vmware-vmx.exe process that has a command line containing *ex02*

Leave a Reply

Your email address will not be published. Required fields are marked *