Change Azure resource tag values
Easily check tag values of Azure resources uses PowerShell
John Savill
January 28, 2017
1 Min Read
![Change Azure resource tag values Change Azure resource tag values](https://eu-images.contentstack.com/v3/assets/blt07f68461ccd75245/blt31bb03f6208cb89f/661cf9ada0677b1fa9d5f66f/azurelogo_4_0_5.jpg?width=1280&auto=webp&quality=95&format=jpg&disable=upscale)
Q. How can I easily check the value of a specific tag for an Azure RM resource?
A. Tags are key-value pairs and can be accessed via the key name which means its very easy to view a value for a specific tag, e.g.
$resource.Tags[""]
for example:
$vm.Tags["dept"]
You could also enumerate them all, e.g.
foreach ($tagName in $resource.Tags.Keys)
{
Write-Output "${tagName}, $($resource.Tags[$tagName])"
}
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like