Azure / Azure/azure-powershell

Get-AzAdvisorRecommendation does not return savings for Microsoft.Compute/virtualMachines

Open
#13,133 16 comments 1 reaction 1 assignee Claimed by @mehowq View on GitHub
act-codegen-extensibility-squad Advisor customer-reported question Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

## Description
When Get-AzAdvisorRecommendation cmdlet returns cost recommendations for Microsoft.Compute/virtualMachines, the data doesn't include the savings amount which is available in the Azure Portal. However, the savingsAmount, savingsPercentage and annualSavingsAmount is available for Microsoft.ReservedInstances/reservedInstances recommendations.

Had a look at the api 2017-04-19 and it seems that the savings information for Microsoft.Compute/virtualMachines recommendations is not available there too?

## Steps to reproduce

```powershell

$recom = Get-AzAdvisorRecommendation -Category Cost
$costRecomVm = $recom | Where-Object {$_.ImpactedField -eq "Microsoft.Compute/virtualMachines"}
$costRecomRi = $recom | Where-Object {$_.ImpactedField -eq "Microsoft.ReservedInstances/reservedInstances"}
$costRecomVm[0].ExtendedProperties
$costRecomRi[0].ExtendedProperties
```

## Module versions

Az.Advisor 1.1.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.