How to get Tags for all the resources on the same Resource Group

When you heavily use Tags on your Azure Resources, is very easy to reach the limits of the Tags that Azure allow to use on each resource. On the other hand, to be consistent on the Tags applied on those resources is key to a good Tag implementation.

The way that I like to do is to create an Azure Automation runbook, so when it runs you will have the output of the Tags for each Resource Group on that Azure Subscription.

To execute the below PowerShell cmdlets in Azure Automation runbook:

  1. Create an Automation Account with Run As account.
  2. Modify the AzureAutomationTutorialScript with below PowerShell cmdlets and execute the AzureAutomationTutorialScript.

Please use the below PowerShell:


$ResourceGroups = Get-AzureRmResourceGroup

foreach ($ResourceGroup in $ResourceGroups)
    Write-Output (“Showing resources in resource group ” + $ResourceGroup.ResourceGroupName)
    $Resources = Find-AzureRmResource -ResourceGroupNameContains $ResourceGroup.ResourceGroupName | Select ResourceName, ResourceType, Tags | Format-Table


Marcos Nogueira
Azure MVP
Twitter: @mdnoga

Marcos Nogueira

With more than 18 years experience in Datacenter Architectures, Marcos Nogueira is currently working as a Principal Cloud Solution Architect. He is an expert in Private and Hybrid Cloud, with a focus on Microsoft Azure, Virtualization and System Center. He has worked in several industries, including Aerospace, Transportation, Energy, Manufacturing, Financial Services, Government, Health Care, Telecoms, IT Services, and Gas & Oil in different countries and continents. Marcos was a Canadian MVP in System Center Cloud & Datacenter Managenment and he has +14 years as Microsoft Certified, with more than 100+ certifications (MCT, MCSE, and MCITP, among others). Marcos is also certified in VMware, CompTIA and ITIL v3. He assisted Microsoft in the development of workshops and special events on Private & Hybrid Cloud, Azure, System Center, Windows Server, Hyper-V and as a speaker at several Microsoft TechEd/Ignite and communities events around the world.

Leave a Reply

Your email address will not be published. Required fields are marked *