【发布时间】:2019-08-22 19:54:15
【问题描述】:
尝试列出包含给定标记值的所有资源组。
在对标签的值进行硬编码时,我能够获得资源列表,但在传递包含该值的变量时却没有成功。
得到以下错误:
+ $resourceGroups = (Get-AzureRmResourceGroup -Tag @{ $Tag}).ResourceGr ...
+ ~
Missing '=' operator after key in hash literal.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingEqualsInHashLiteral
不确定如何让命令评估$Tag的值
【问题讨论】:
标签: azure powershell azure-resource-group