Is anyone else experiencing an issue where the value in the key value pairs that are AzureRm resource tags are not filtered by key when running Get-AzureRMResourceGroup ?
Example, the following returns all AzureRM resource groups that have any tag with the value of ‘Value1’:
Get-AzureRmResourceGroup -Tag @{Label1= ‘Value1’}
Currently running AzureRM module version 6.13.1
Hello Seabass,
I just tested this with some Azure Resource Groups and it is working for me.
Screenshot - Redirects to Onedrive and expires on 08-30-2019.
Get-AzureRmResourceGroup -Tag @{Dept="IT"} | FL ResourceGroupName, Tags
ResourceGroupName : cloud-shell-storage-westus
Tags : {Environment, Dept}
ResourceGroupName : network-rg-westus
Tags : {Environment, Dept}
ResourceGroupName : servers-rg-westus
Tags : {Environment, Dept}
ResourceGroupName : stroage-rg-westus
Tags : {Environment, Dept}
Hey Jason-
Thanks for trying it out. NOW try:
Get-AzureRmResourceGroup -Tag @{Environment=“IT”}
(assuming you don’t have Environment tags without a value of “IT”
Seabass,
Looks like you are right, something weird is going on. I updated the test resource groups to confirm and it appears the filter is pulling all tags with the value IT in it. I even updated the department to Sales and can see all 4 resources pull even though the Department for one of the Resource Groups is sales. I would recommend you to open a case with Microsoft for additional support of the issue.
Screenshot - Link expires on 08-30-2019
Jason-
Awesome, thanks for the confirmation!