I have a powershell file test.ps1 which takes 3 parameters. I am trying to call/execute this file from a script step/task in octopus.
Can I do this, if I can how to achieve this.
I tried a few things to achieve this.
- Use a batch file (test.bat) powershell E:\somefolder\test.ps1 %1 %2 %3 to call the below in the script task in octopus to execute this E:\somefolder\test.bat p1 p2 p3
The above does not work and says cmdlet does not identify the command.
- Use the ps1 file itself i.e. call E:\somefolder\test.ps1 p1 p2 p3 to call in the script task in octopus.
This gives the same error as above.
I changed the code a little bit to use param([string]$param1, [string]$param2, [string]$param3) and then I get the parameter cannot be found.
Can someone please help me with this issue.