How to import the list of Azure Vm's associated with the specific key vault through powershell ?
Kindly help me with steps.
How to import the list of Azure Vm's associated with the specific key vault through powershell ?
Kindly help me with steps.
@John-8849
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:
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.
@John-8849
I just wanted to check in and see if you had any other questions or if you were able to resolve this issue?
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.

8 people are following this question.
Will Microsoft see my keys in Azure Key Vault?
What are the different ways to authenticate to Azure Key Vault?
What are Azure Key Vault's soft-delete and purge protection features?
What is the limit of number of key vaults per subscription?
What is the difference between a key and a secret in Azure Key Vault?