Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to run window process check for multiple processes #112

Open
dbadyan opened this issue Aug 22, 2020 · 2 comments
Open

unable to run window process check for multiple processes #112

dbadyan opened this issue Aug 22, 2020 · 2 comments

Comments

@dbadyan
Copy link

dbadyan commented Aug 22, 2020

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

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...

@derekgroh
Copy link
Contributor

@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?

@dbadyan
Copy link
Author

dbadyan commented Aug 22, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants