sensu-plugins-windows
sensu-plugins-windows copied to clipboard
unable to run window process check for multiple processes
Hi, the following line returns an error when running the script with multiple values. (such as 'cmd','explorer') https://github.com/sensu-plugins/sensu-plugins-windows/blob/17122e8d0bbdc2dee708279a57beaf9c91016973/bin/check-windows-process.ps1#L30
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
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...