小编Tyl*_*Ham的帖子

如何在会话之间保留AzureRMAccount

Add-AzureRmAccount或者别名Login-AzureRmAccount似乎没有在会话之间持续存在Add-AzureAccount.

有没有办法让它坚持下去?

powershell azure

6
推荐指数
1
解决办法
2870
查看次数

Azure PowerShell Add-AlertRule在资源组上使用CpuPercentage时返回错误请求

我得到一个Azure资源组并尝试添加类型为CPUPercentage的度量标准警报规则,但它失败并带有BadRequest.

> $r = Get-AzureRmResourcegroup
WARNING: The output object of this cmdlet will be modified in a future release.
> $a = $r[0]
> Add-AlertRule -Location "West US" -MetricName CpuPercentage -Name CPU98Percent -Operator GreaterThanOrEqual -ResourceGroup $a.ResourceGroupName -ResourceId $a.ResourceId -RuleType Metric -Threshold 98
Add-AlertRule : BadRequest:
At line:1 char:1
+ add-alertrule -Location "West US" -metricName CpuPercentage -Name CPU ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-AlertRule], CloudException
    + FullyQualifiedErrorId : Hyak.Common.CloudException,Microsoft.Azure.Commands.Insights.Alerts.AddAlertRuleCommand
Run Code Online (Sandbox Code Playgroud)

它从门户网站正常工作.还没有具有相同名称的警报.我正在使用Azure模块的第1版和AzureRM的1.0.2版.

powershell azure

5
推荐指数
1
解决办法
963
查看次数

标签 统计

azure ×2

powershell ×2