Mallikarjuna Reddy
Mallikarjuna Reddy

Reputation: 5

How to increase output rows in Resource Graph Query in Azure

I am using Resource Graph Powershell module to query all the recent change details in my Subscription.

https://learn.microsoft.com/en-us/azure/governance/resource-graph/how-to/get-resource-changes?tabs=azure-powershell

But though there are many changes happened, the query is returning at max 100 at a time. So is there a way to get the complete records?

Is there a way to get all available records from Resource Graph module?

Upvotes: 0

Views: 672

Answers (1)

RithwikBojja
RithwikBojja

Reputation: 11183

I have reproduced in my environment and got expected results as below and I followed Microsoft-Document:

$count= Search-AzGraph -Query 'resourcechanges | project properties.changeAttributes.timestamp, properties.changeType, properties.targetResourceId, properties.targetResourceType, properties.changes' -First 1000
 $count | Measure-Object     

enter image description here

So you need to use -First Paramter

Or you can use the query directly in Azure Resource graph Explorer as below:

enter image description here

Upvotes: 0

Related Questions