List of VM's associated with Key Vault

John L (SX/EDA1) 1 Reputation point
2021-09-06T07:24:37.57+00:00

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,448 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. JamesTran-MSFT 36,906 Reputation points Microsoft Employee Moderator
    2021-09-08T22:05:08.29+00:00

    @Anonymous
    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'  
    

    130307-image.png

    Additional Links:
    Get-AzKeyVault
    Az.KeyVault

    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 6 Reputation points
    2022-03-14T16:44:07.717+00:00

    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.

    182928-key-vault-secret-vm-name.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.