Get-PSUVariable to get Secret


I am trying the following in a PowerShell (not in an API Endpoint or PSU-Script)

Connect-PSUServer -ComputerName “https://mypsuserver.domain” -UseDefaultCredentials

$secretVar = Get-PSUVariable -Name “MySecretVar” -UseDefaultCredentials

‘****’ (4 asterix)

I would have expected the secret.

Get-ChildItem “Secret:\MySecretVar” doesn’t work neither.

With Get-PSDrive / Get-PSProvider I can see that there is a “Secret” drive/provider but they seem not to be populated.

Is it possible to access PSU-Variables this way from a Powershell by connecting to PSU-Server and use Get-PSUVariable? Or are they valid only inside API endpoints and PSU-Scripts ?


Product: PowerShell Universal
Version: 4.2.13

We never return the value of secrets from the API. They are only accessible within PSU.

You could create an API endpoint to do this but that could be considered a security issue.

Understood. And you are absolutely right about security.