2
votes

Am working on Azure key vault concept and fetching all keys in key vault by using PowerShell command :

Get-AzureKeyVaultKey -VaultName 'vaultname'

But here, am getting all keys including Disabled state keys also. I want to fetch only the keys which are in Enabled status with latest version. Can you please give me suggestions for this issue?

For this I followed the links like: Link1 Link2

1

1 Answers

0
votes

Currently, Get-AzureKeyVaultSecret cmdlet does not support comprehensive filtering nor searching capabilities. However, it is possible to apply filters on the client side as secrets as fetched from the Azure Key Vault. Find a PS script to search secrets in Azure Key Vault at https://github.com/evandropaula/Azure/blob/master/KeyVault/PS/Search-KeyVaultSecretsByName.ps1. Please keep in mind Azure Key Vault was not built for high throughout. Therefore, consider caching the secrets on the client side if it is going to be called frequently.