I am trying to access a variable from a previous step defined as a “Previous Deployment Step name” parameter from PowerShell.
Regular syntax for static step name is:
$PrevStepParam = $OctopusParameters["Octopus.Action[PrevStepName].Output.Param"]
However what would the syntax look like for dynamic PrevStepName?
I would need something like the below, but cannot figure out the right syntax:
$PrevStepParam = $OctopusParameters["Octopus.Action[$OctopusParameters['PrevStepName']].Output.Param"]
Thank you in advance.