unable to run window process check for multiple processes
dbadyan opened this issue · comments
Hi, the following line returns an error when running the script with multiple values. (such as 'cmd','explorer')
C:\Users\Administrator\Desktop\check-windows-process.ps1 : Cannot process argument transformation on parameter
'ProcessName'. Cannot convert value to type System.String.
At line:1 char:58
- C:\Users\Administrator\Desktop\check-windows-process.ps1 'cmd','explorer'
-
~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidData: (:) [check-windows-process.ps1], ParameterBindingArgumentTransformationExce
ption - FullyQualifiedErrorId : ParameterArgumentTransformationError,check-windows-process.ps1
- CategoryInfo : InvalidData: (:) [check-windows-process.ps1], ParameterBindingArgumentTransformationExce
when the [string] is removed the check works, but it's there to convert the value to a string so just removing it is not really the best solution...
@dbadyan Looking through the history, this check never supported multiple values. Have you had this work prior with multiple values before the last commit or is this a feature request?
No, this never worked before, but running the core command (get-process) with multiple values is valid so i expected the check to support it too. I suppose if this wasn't the original intention then it is indeed a request.