Hi,
I’ve got a deployment step that runs inline Powershell script. How can I extract the whole script output and store it into output variable or file or somewhere else?
Thank you,
Dmitry
Hi,
I’ve got a deployment step that runs inline Powershell script. How can I extract the whole script output and store it into output variable or file or somewhere else?
Thank you,
Dmitry
Hi @d.zamakhov, thanks for reaching out.
The Octopus.Action[Step Name].Script.ScriptBody
variable contains the inline script value.
You can find the variables available to a step by setting the OctopusPrintEvaluatedVariables
Octopus variable to True
. These variables are documented at https://octopus.com/docs/support/debug-problems-with-octopus-variables.
The screenshot below shows these variables listed in the verbose logs for a script step.
Regards
Matt