Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (13.1k points)

Is it possible to list all the secrets and the plain text value? I tried with the following code, but it just shows blank string for secret value.

Get-AzureKeyVaultSecret -VaultName MyKeyVaultName | Select-Object Name,SecretValueText

Can anyone help me with this?

1 Answer

0 votes
by (26.7k points)

You need to create a loop around the secrets. And to do that, follow the below command:

$q = Get-AzureKeyVaultSecret -VaultName 'xxx'

$q.foreach{ Get-AzureKeyVaultSecret -VaultName $_.VaultName -Name $_.Name }.SecretValueText

I hope this will help.

Want to become an Azure expert? join Azure Training now!!

Related questions

Browse Categories

...