簡體   English   中英

Azure CLI - Azure 顧問建議 - 沒有“Microsoft.Compute/virtualMachines”的成本數據

[英]Azure CLI - Azure Advisor Recommendation - does not have cost data for 'Microsoft.Compute/virtualMachines'

我正在使用 az cli 獲取 Azure 顧問推薦數據

az advisor recommendation list  --category cost  --subscription ************* -o json --query  "[?impactedField == 'Microsoft.Compute/virtualMachines'].{resource: impactedValue, cat: category, cpu:  extendedProperties.MaxCpuP95 , memory:  extendedProperties.MaxMemoryP95, saving:  extendedProperties.savingsAmount, Recommendation: shortDescription.solution }"

從門戶網站下載 pdf 時,它具有“潛在節省/年”。 我發現 az cli 正在為“預留實例建議”重新調整不同的 output,但對於 VM,它沒有成本相關信息。

您可以使用以下 PowerShell cmdlet 提取訂閱中虛擬機的潛在節省。

Get-AzAdvisorRecommendation -Category Cost | Where-Object {$_.ImpactedField -eq "Microsoft.Compute/virtualMachines"} | Select-Object -ExpandProperty ExtendedProperties

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM