Issue using credentials in Dashboard and scripts

Product: PowerShell Universal
Version: 4.1


I'm quite likely making a simple mistake here. But based on the docs using a secret variable should be as simple as typing $Secret:VariableName
https://docs.powershelluniversal.com/platform/variables

I have the variable included in the environment settings

The environment and the dashboard are both running using "Run as" 

I previously had this running with PowerShell Universal 2.x. But I accept things have become more complicated and vastly more powerful since then.