Getting the Plain Text Value of an Azure Key Vault Secret with PowerShell

Related imageAzure’s Key Vault is a great way to store certificates, usernames, passwords, for use in your Azure applications, infrastructure operations, and more.

This is just a quick post to tell you how you can get at the value of a stored Secret in the Key Vault with PowerShell and the Azure module.

You can see, I have a Key Vault named gvkeyvault, and a secret named geoffv

image

Now, to get it, we can use the Get-AzureKeyVaultSecret cmdlet. By giving it our VaultName and our key Name, we can see the key. However, that does not get us the value of our Secret.

image

To do that, we need to get the SecretValueText property of the Key Vault Secret.

(Get-AzureKeyVaultSecret –VaultName “gvkeyvault” –Name “geoffv”).SecretValueText

image

You can see we get the value out of “12345”…

image

Now I need to go change the combination of my luggage.

Advertisement
%d bloggers like this: