How to get all Azure Resources without tags in a Azure Resource Group

Here's a simple PowerShell loop to get untagged resources.

$resources = Get-AzureRmResource
foreach($resource in $resources)
{
    if ($resource.Tags -eq $null)
    {
        echo $resource.Name, $resource.ResourceType
    }
}

Other ways to query this information and also set tags programmatically or as part of resource deployments are described here.

If you want to avoid the situation of ending up with untagged resources, you could enforce a customized policy that all resources should have a value for a particular tag.


Here is the idiomatic PowerShell to supplement @huysmania's answer which is expressed in procedural language mindset (and updated for the new PowerShell Az cmdlets):

Get-AzResource | Where-Object Tags -eq $null | Select-Object -Property Name, ResourceType

and the terse (alias) form:

Get-AzResource | ? Tags -eq $null | select Name, ResourceType