In this Azure PowerShell article, we will discuss the syntax and usage of the Get-AzTag PowerShell command with certain examples.
Table of Contents
Get-AzTag
Get-AzTag is an excellent Azure PowerShell command that can help you retrieve the lists of predefined Azure tags from your subscription.
Syntax
Below is the syntax of the Get-AzTag PowerShell command.
Get-AzTag
Get-AzTag
-ResourceId <String>
Get-AzTag examples
Let’s discuss a few examples of how to use the Get-AzTag PowerShell command.
Example-1:
You can execute the below PowerShell command to get the lists of predefined Azure tags from your subscription.
Get-AzTag
After executing the above PowerShell command, I got the below-expected output.
PS C:\windows\system32> Get-AzTag
Name Count
---- -----
ms-resource-usage 1
Services 2
You can see the same output below

Example-2:
You can execute the below PowerShell command to get the predefined Azure tags with the name specified.
Get-AzTag -Name "Services"
After executing the above PowerShell command, I got the below output as expected.
PS C:\windows\system32> Get-AzTag -Name "Services"
Name ValuesTable Count Values
---- ----------- ----- ------
Services ... 2 {Azure}
You can see the same in the below screenshot.

Get-AzTag PowerShell – Video Tutorial
Conclusion
In this Azure PowerShell article, we discussed, the syntax and usage of the Get-AzTag PowerShell command with certain examples. Thanks for reading this article !!!