运行Add-AlertRule时出现以下错误。我已登录为Login-AzureRmAccount甚至Get-AzureRmResource工作。我在windows10上。安装了azure powershell 版本1.6
Add-AlertRule:术语' Add-AlertRule'不被识别为a的名称 cmdlet,函数,脚本文件或可操作程序。检查拼写 名称,或者如果包含路径,请验证路径是否正确,然后重试。
Add-AlertRule -Name $alertName -Description $description `
-ResourceGroup $resourceGroup `
-ResourceId "/subscriptions/$subscriptionId/resourcegroups/$resourceGroup/providers/microsoft.insights/components/$appInsightName" `
-MetricName $metricName `
-Operator GreaterThan `
-Threshold $threshold `
-WindowSize $windowSize `
-SendToServiceOwners `
-Location "East US" `
-CustomEmails 'DavidChew@Contoso.com','PattiFuller@Contoso.com'
-RuleType Metric