I am trying to pass PowerShell variable to an Azure Devops variable in pipeline during runtime but unable to pass them successfully. Could someone guide the correct syntax to apply escape sequence?
Azure devops pipeline variable:-
foo_ABC = abcdefghigklmnopqrstxyz
env= abc
Powershell task in pipeline:-
$environment= "$(env)".ToUpper()
$temp= "foo_$($environment)"
Write-Output "$($temp)"
Output:-
Expected: abcdefghigklmnopqrstxyz
Actual: (foo_ABC)