First I have tried to locate other questions and these all seem related to replacement rather than expansion.
- How to expand variable in powershell?
- Powershell variable expansion when calling other programs
- Powershell variable expansion in parameters
- How to expand a variable when calling another powershell instance?
So I must first create clarity on what I mean by "expansion".
> $TEST="Foo Bar"
> echo foo bar
foo
bar
> echo $TEST
Foo Bar
When passing two parameters, powershell's implementation of echo will print each parameter on its own line.
If I echo a variable with two parameters it is passed as a single parameter. I would like the variable to be expanded into the multiple arguments which it contains, getting the behavior from the first instance.
I have looked at:
- Single quotes
- Parentheses
- Curly braces in different forms
Is this possible in powershell?
Context Update:
Unfortunately I'm not the one setting the variable, this comes from gitlab environment variables.