Getting the Plain Text Value of an Azure Key Vault Secret with PowerShell
February 28, 2018 Leave a comment
Azure’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
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.
To do that, we need to get the SecretValueText property of the Key Vault Secret.
(Get-AzureKeyVaultSecret –VaultName “gvkeyvault” –Name “geoffv”).SecretValueText
You can see we get the value out of “12345”…
Now I need to go change the combination of my luggage.