Az.Resources module: setup and commands
Documentation: Microsoft Learn
Inventory Azure resources with Get-AzResource and Get-AzResourceGroup, then scope changes carefully by subscription, resource group, type and tag.
Getting it
Install-PSResource -Name Az.Resources from the PowerShell Gallery. It pulls Az.Accounts in as a dependency.
Examples
Show reference output
Show reference output
What it is for
Use it for cross-service inventory, because Get-AzResource returns every resource type in one pass. It is also where role assignments and policy assignments get read for an access review.
Typical tasks
- Inventory every resource in a subscription
- Find resources missing a required tag
- List resource groups with their locations
- Report role assignments at a given scope
- Review deployment history for a resource group
- Locate resources by tag value
Check the installed version
Compare the module path and version with the session used by your scheduled task or automation account. Use it for cross-service inventory, because Get-AzResource returns every resource type in one pass. It is also where role assignments and policy assignments get read for an access review.