Secrets with "-" in the name

Product: PowerShell Universal
Version: 4.3.0

Hi,

Quick question - we have several secrets with “-” in the name, and when we attempt to retrieve them using the normal way ($Secret:Secret-Name), then it dosent work.

How can i retrieve the secrets, if the name of the secrets contains a “-” ?

Found the fix - for anyone else, with the same issue :slight_smile:

$(Get-ChildItem -Path "Secret:$($locallogin.SecretName)")

This was already answered in another users’s post, by Adam.