Powershell gitlab runner - how to reference variables and append strings

I’ve got a gitlab-ci-yml with a few paths specified at the top. For example:
variables:
newman: C:\Users\Roaming\npm\newman.cmd

I’m using a powershell runner since the standard windows shell runner wouldn’t execute more than one step of my script. How do I go about referencing this path as part of the command I want to execute? I’ve tried all manner of combinations but just can’t seem to get it to work.

Examples I’ve tried

  • Write-host “$($env:newman) run ./postman_collection.json --bail”
  • $env:newman ‘run ./postman_collection.json --bail’
  • ‘"$env:newman" run ./postman_collection.json --bail’

The docs say to reference variables with $env:variablename in powershell but I’m not sure if that applies to the standard environment-variables or them + custom variables within a script.

What I want is for the concatenation to result in the following command being run:

C:\Users\Roaming\npm\newman.cmd run ./postman_collection.json --bail