This method helps to exclude secrets and passwords from the script itself. So be compliant right from the start.
The Key secrets are stored as hash values in the Robogator database. Just in time, in fact, only during the script runtime are the key secret available as decoded values. Add the Key secret you want to access in the script the Task first.
To get a Key secret as string during the Task script runtime, add this method to very first line of the script:
Then you can access the Key secret within the script using the following method:
Write-Host "MyKey is: " $MyKey
Powershell
To access Robogator proprietary variables with PowerShell, you have to first initialize all variables on the first line of the script and after that it is possible to access the variables in the underlaying script lines.