Is there a way to specify the -Filter
parameter, using the WMI Query Language (WQL), of the Get-WmiObject cmdlet to filter based on the “Command Line” used to invoke the process? By “Command Line” I mean the “Command Line” that is shown in the Windows Task Manger, Process tab.
I want to get an array of process ids where the command line contains the string *Dev_SW*
. I cannot use name because there are will be many process running with the same name that are not equal to the *Dev_SW*
filter.