I have tagged my azure resource groups based on environments.
Now I'am trying to do some automation on the test environments and I want to retrieve all resource groups tagged with Env=test.
I found this line here (https://azure.microsoft.com/nb-no/documentation/articles/resource-group-using-tags/)
$testRg= Find-AzureRmResourceGroup -Tag @{ Name="Env"; Value="Test" } | %{ $_.Name }
The problem is that this doesn't return anything.
Then i tried to tag a single resource with the same tag and that worked with this line:
$testR= Find-AzureRmResource -TagName Env -TagValue Test| %{ $_.ResourceName }
Anyone experienced this or know what I'am doing wrong?