Azure Resource Graph Explorer

M, RAKESH 121 Reputation points
2022-04-07T11:49:49.687+00:00

How to get the all the VMs operating system and version details using Azure Resource Graph Explorer.

Ex: Linux (oracle 8.5)

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,015 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Prrudram-MSFT 28,201 Reputation points Moderator
    2022-04-07T14:02:31.377+00:00

    Hello @M, RAKESH ,

    Thank you for reaching out to the Microsoft Q&A platform. Happy to answer your question. Please use the resource table in azure resource graph explorer when running the below query.

    resources  
    | where type =~ 'Microsoft.Compute/virtualMachines'  
    | summarize count() by tostring(properties.storageProfile.osDisk.osType),tostring(properties.storageProfile.imageReference.offer), tostring(properties.storageProfile.imageReference.sku)  
    

    190997-image.png

    Reference : https://learn.microsoft.com/en-us/azure/governance/resource-graph/first-query-portal

    Please "Accept as Answer" and Upvote if any of the above helped to help others in the community looking for remediation for similar issues.

    1 person found this answer helpful.
    0 comments No comments

  2. Rajesh Sridharan 0 Reputation points
    2023-10-04T19:06:47.87+00:00

    How to pull only for linux?

    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.