So basically I need to run my ps1 script from command line and pass my custom arguments into my script. My script expects a String array, but when I run the command, I get an error that a positional parameter cannot be found that accepts argument 'X1'
This is my command line:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy RemoteSigned -NoProfile -NonInteractive -File "C:\Program Files\MSBuild\MyScript.ps1" -builds "X1” “X2" "X3" "X4"
My understanding is it knows what to do with the first parameter 'X1' but not the second and so it crashes? Any ideas whay?
