虽然我知道答案,但我只是想我会把这个问题留给遇到此错误消息的其他人。我的搜索结果中似乎没有任何结果。
使用此命令运行 Azure 资源管理器模板时:
New-AzResourceGroupDeployment -WhatIf -ResourceGroupName my-rg -TemplateFile my-rg-tst-parameters.json -TemplateParameterFile .\my-rg-tst-parameters.json
我收到这个错误:
New-AzResourceGroupDeployment: Cannot retrieve the dynamic parameters for the cmdlet. Parameter type in parameters cannot be null or empty
最佳答案
这种情况下的错误是因为正在运行的命令将参数文件传递到它应该解析模板文件的位置。正确的命令是:
New-AzResourceGroupDeployment -WhatIf -ResourceGroupName my-rg -TemplateFile .\my-rg-template.json -TemplateParameterFile .\my-rg-tst-parameters.json
关于powershell - 新的 AzResourceGroupDeployment : Cannot retrieve the dynamic parameters for the cmdlet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63216954/