Problem in storing comma separated values in octopus output variable

I was trying to store a comma separated value in Octopus output variable but that comma gets converted to space when I print it later.
eg $anyString = “Hello,Hi”

Set-OctopusVariable -name “Test” -value “$anyString”
#{Octopus.Action[Set Target List].Output.Test} will give me- Hello Hi.
Am I doing something wrong here? I need a comma separated target role list so I can replace it in some configuration file using variable substitution.

This is working now after using an escape character:
$anyString = “Hello`,Hi”

Hi @saurabh.ghildiyal,

That’s great to hear that you got it working. Thanks for sharing the solution too :slight_smile:

Regards,
Paul

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.