在命名空间Microsoft.storage for api版本2018-01-01-Azure Powershell中找不到资源类型

在命名空间Microsoft.storage for api版本2018-01-01-Azure Powershell中找不到资源类型,azure,powershell,azure-resource-manager,Azure,Powershell,Azure Resource Manager,我正在Azure存储上创建一个度量警报,因为我有一个ARM模板 当我通过Azure Powershell执行它时,我收到一个错误,如下所述,我不确定是什么导致了这个问题 POWERSHELL命令:New-AzResourceGroupDeployment-name“StorageBlobDeployment”-ResourceGroupName TestStorage RG-TemplateFile“C:\ARM\azureDeploy.storage.json”-TemplateParamet

我正在Azure存储上创建一个度量警报,因为我有一个ARM模板 当我通过Azure Powershell执行它时,我收到一个错误,如下所述,我不确定是什么导致了这个问题

POWERSHELL命令:
New-AzResourceGroupDeployment-name“StorageBlobDeployment”-ResourceGroupName TestStorage RG-TemplateFile“C:\ARM\azureDeploy.storage.json”-TemplateParameterFile“C:\ARM\azureDeploy.storage.parameters.json”

虽然当我通过门户部署相同的ARM模板时,它工作得很好

错误如下:

new-AzResourceGroupDeployment : 2:37:34 PM - Resource microsoft.insights/metricAlerts '-storage_account_ingress_traffic_alert' failed with message '{
  "Code": "BadRequest",
  "Message": "The resource type could not be found in the namespace 'Microsoft.storage' for api version '2018-01-01'."
}

我想这是因为你的Azure Powershell已经过时了。更新它,它就可以正常工作。

感谢您的回复。我已尝试更新Az模块,但没有成功谢谢您的回复。我尝试过更新Az模块,但没有成功是的,基本上是因为它使用了一些硬编码的api版本,而且它还不够新,不足以支持该功能。