Azure Resource Graph II – Output data type

After a first insight into Azure Resource Graph (in public preview as of Oct 2018) here, lets do a bit of an analysis of the data, the Az.ResourceGraph Module provides.

Lets say, we want to know which kind of resources (providers) we have in our subscription

The search query for this is simple: „project type“

This query is returning a list of provider types

Now we want to see only unique records, nothing easier that thet with the PowerShell Select-Object -Unique parameter switch.

which emits just a single line 🙁

What we learned is that Azure Resource Graph emits a PSObject, but the content is within a „NoteProperty“. To see what we want – a list of the resource types in Azures –  we need to use -expandproperty first and then use the -unique.

So our one-liner would be

… which gets us a nice type list of our Resources.

More to come on ARG soon…