Powershell script Variables

$FolderName = $OctopusParameters[‘BuildFolder’]

robocopy \My-server-path$FolderName\ C:\myfolder\ files

I have a variable called BuildFolder with a value of promt. When I deploy it indeed asks me for the value but it never apears on the powershell, the log shows
Source : \My-server-path
Dest : C:\myfolder
Basically the source s missing the variable i input i.e foldername. Kindly let me know how to get this working.

Thank you,
Moody Amakobe

Sorry I cut and paste my question and forgot the top Part, Meant to say I need help with a simple powershell script I’ve written in Octopus as below 9well now above).

Hi Moody,

I’ve created a quick how-to page on variable debugging that will show you how to dump the variables from a deployment: http://docs.octopusdeploy.com/display/OD/Debug+problems+with+Octopus+variables

Can you please check the output from that and let me know whether the variable you’re looking for appears as expected?

Also, it would be great to know which versions of Octopus Server and Tentacle you’re running.


Hi Nick,
Thank you for the response, I figured out what the issue was, I a had specified the scope of the variable, when i removed it shows up. I’m yet to determine why. But thank you.