How to Tag Azure Resources with PowerShell

In this blog post, we will discuss how to tag Azure resources using PowerShell.

Azure tags are a useful tool for organizing and managing your cloud resources, allowing you to categorize and quickly find them based on specific criteria. They are particularly helpful when working with large-scale environments, enabling streamlined administration and cost allocation.

Add or Update Tags

In the code below, I am tagging an Azure Automation account with two tags I have defined inside a PowerShell hashtable.

$Tags = @{"Enviorment-Name"="DEV";"Owner"="NTWEEKLY.COM"}

Set-AzAutomationAccount -Name $AutomationAccountName   -ResourceGroupName $rgname -Tags $Tags

You can use this process to tag multiple resources or even automate tagging as part of your infrastructure provisioning process.

Success! You're on the list.

1 thought on “How to Tag Azure Resources with PowerShell”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.