how to get boot diagnostic storage account of all the VMs in All the subscriptions

Raina, Vikas 1 Reputation point
2022-06-15T14:48:14.85+00:00

I am looking for a Azure query or Azure CLI, Powershell command using which I can download a report of all the Azure VMs and their corresponding Bootdiagnostic Storage accounts.

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,542 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SaiKishor-MSFT 17,336 Reputation points
    2022-06-23T23:13:20.527+00:00

    @Raina, Vikas Thanks for reaching out to Microsoft Q&A. I understand that you want a report of all the Azure VMs and their corresponding Boot diagnostic Storage Accounts.

    To Get all virtual machines in your subscription - Get-AzVM should provide you with the same.

    To get a list of VMs in all your subscriptions, you will need a script for the same. Here is an example of the same.

    As per Boot diagnostics enabled VMs, I will look into the same and get back to you if there is any command/script for the same. Thank you!


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.