Secret Variables

avatar
(anonymous user)
Product: PowerShell Universal
Version: 5.0.12


Testing secret variables in API and got stuck…
As pictures shown, $Secret:HelloSecret
I can’t get any value in API



36a1dea253af8428a9fe8fdc036d1440fb6cc6d9
4a01451e08b4402f62776bda4564f313fed41dce

4a01451e08b4402f62776bda4564f313fed41dce.png

36a1dea253af8428a9fe8fdc036d1440fb6cc6d9.png

All Comments (2)

avatar

$Secret: variables will not be shown in output, that would be a security issue

avatar

I see

it works as run as cred with script

but if I try to use it in API with Invoke-Restmetod ********* -Credential $Secret:mysecret

It seems not working, is it by design or is it only works in scripts?