【问题标题】:Azure Tag for Azure Depolyment not workingAzure 部署的 Azure 标记不起作用
【发布时间】:2021-07-06 09:28:22
【问题描述】:

我正在尝试创建一个带有 Tag 参数的 Azure 部署,以便使用命令 New-AzResourceGroupDeployment 将标签放在部署上,例如 -

 New-AzResourceGroupDeployment -ResourceGroupName "demo" -TemplateFile "D:\Templates\storage.json" -Tag @{"CreatedFrom"="PS"; "Env"="Dev";}

但面临这个问题 -

New-AzResourceGroupDeployment : A parameter cannot be found that matches parameter name 'Tag'.
At line:1 char:102
+ ... Name "demo" -TemplateFile "D:\Templates\storage.json" -Tag @{"Crea ...
+                                                              ~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-AzResourceGroupDeployment], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.N
   ewAzureResourceGroupDeploymentCmdlet

根据documentation,我们可以使用New-AzResourceGroupDeployment 命令放置标签参数,但它对我不起作用。

对于我在这里做错的任何帮助将不胜感激!

【问题讨论】:

    标签: azure powershell azure-resource-manager azure-deployment


    【解决方案1】:

    该命令在这里工作正常。确保您拥有最新版本的命令。

    https://docs.microsoft.com/en-us/powershell/azure/new-azureps-module-az?view=azps-6.1.0

    【讨论】:

    • 命令运行成功,在哪里查看部署标签?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-22
    • 2015-05-03
    相关资源
    最近更新 更多