List of VM's associated with Key Vault

John L (SX/EDA1) 1 Reputation point

How to import the list of Azure Vm's associated with the specific key vault through powershell ?
Kindly help me with steps.

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,165 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. JamesTran-MSFT 36,516 Reputation points Microsoft Employee

    Thank you for your post and I apologize for the delayed response!

    To get a list of VMs associated with a specific Key Vault, you can run the Get-AzKeyVault PowerShell command. Using the output, you can see what access policies are assigned and to which VM.

    Get-AzKeyVault -VaultName 'myvault'  


    Additional Links:

    I hope this helps, if you have any other questions, please let me know.
    Thank you for your time and patience throughout this issue.


    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

  2. Viresh Mathapati 1 Reputation point

    I tried Get-AzKeyVault -VaultName 'myvault' but this isn't helpful to get list of VM's associated with Key Vault, it only displays the access policies of the key vault not the list of VMs encrypted using the key vault.

    There is another manual way I found, go to particular Key Vault>>Secrets>>Select and open the particular Secret then you will be able to see the tags there and one of the tag should have contained the VM name.


    0 comments No comments