Trying to list all resource groups that contain a given tag value.
I was able to get a list of resources when hardcoding the value of the tag, but I am not successful when passing a variable containing the value.
getting the following error:
+ $resourceGroups = (Get-AzureRmResourceGroup -Tag @{ $Tag}).ResourceGr ...
+ ~
Missing '=' operator after key in hash literal.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingEqualsInHashLiteral
not sure how to make the command evaluate the value of $Tag