Open In App

Microsoft Azure – Find Virtual Machine Extensions using Resource Graph Query

Last Updated : 31 Mar, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Azure is Microsoft’s cloud platform, just like Google has its Google Cloud and Amazon has its Amazon Web Service or AWS.000. Generally, it is a platform through which we can use Microsoft’s resources.

Here in this article, we are going to learn about how we find azure virtual machine-installed agents or extensions using the azure resource graph queries from the Azure portal. For this we don’t need to set up any environment, we can directly run the azure resource graph queries in azure resource graph explorer. This will help us to save a lot of time finding analysis, and removals, and we can even export data lists into CSV or Excel.

Implementation:

Step 1: Open the Azure Portal.

Step 2: From azure global search >> search for “Resource Graph Explorer” and select.

 

Step 3:  Next select the scope of your type, anyone out of Directory, Management, or Subscription, and click on Apply to make the changes.

 

Step 4: After selecting the scope, go to the query section and add the following resource graph query >> Click on Run query

the 
| where type == "microsoft.compute
/virtualmachines/extensions"

This query will return all the virtual machines installed extensions from the selected scope.

Output:

 

Step 5: To view only the selected virtual machine installed agents or extensions, use the following resource graph query to filter.

resources
| where type == "microsoft.
compute/virtualmachines/extensions"
| where tostring(id) has "<AzureVM_Name_Here>"

This query will return all the virtual machines’ installed extensions from only the queried virtual machine name.

Output:

Query Output 2

 


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads