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.
The above does not work and says cmdlet does not identify the command.
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.
In Octopus Deploy you can use a "Run Script" step to execute scripts. This step is designed to execute PowerShell on the deployment target, which removes the need to find ways of kicking of the script. It also means that the step becomes part of the deployment process and you can end the deployment if it fails.
In the nextversion of Octopus Deploy (v3.3) you can have your PowerShell script in source control, or you can edit the script in the step itself. You have access to project variables and Octopus system variables in the script.
In previous versions, only the option to edit the script within the step was available.
Go to your Project's process in Ocotpus Deploy and...