Adding dollar sign in front of variable name in arguments of Powershell script

290 Views Asked by At

I am working on pipeline where I am passing arguments in the powershell script as below. I want to append ServiceName and Environment.Name with a $ sign.

arguments: '-ServiceDisplayName "$(ServiceDisplayName)" -ServiceName "$(ServiceName)$(Environment.Name)" -ServiceDirectory "$(ServiceFolder)" -UserName "$(ServiceUserAccount)"'

Tried -ServiceName "$(ServiceName)`$$(Environment.Name)"

0

There are 0 best solutions below