New-AzureRmResourceGroupDeployment命令给出错误

时间:2017-05-04 19:36:39

标签: powershell

当我运行New-AzureRmResourceGroupDeployment并传递JSON参数文件时,我收到以下错误:

New-AzureRmResourceGroupDeployment : 2:29:31 PM - Resource Microsoft.Sql/servers 'qsservername' failed with message '{
  "code": "15021",
  "message": "Invalid value given for parameter Login. Specify a valid parameter value.",
  "target": null,
  "details": [
    {
      "code": "15021",
      "message": "Invalid value given for parameter Login. Specify a valid parameter value.",
      "target": null,
      "severity": "16"
    }
  ],
  "innererror": []
}'
At M:\Azure\Azure Scripts\Something\somethingdeploy.psm1:63 char:4
+    New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGro ...
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet

但是,当我运行相同的命令但传递参数而不是文件时,它工作正常。任何想法,我可能会失踪?

1 个答案:

答案 0 :(得分:2)

对我来说,当我尝试使用现有的SQL Azure实例资源运行ARM模板时,会发生此错误。问题是在模板中我指定了一个DB用户名,该用户名与现有实例的admin用户名不匹配。可以更新密码,但用户名必须在SQL Azure实例的生命周期内保持不变,