In the section above, it would be common for the command to return many thousand objects especially for long date ranges. To prevent overwhelming the API, the
Get-UsageAggregates
command only returns a maximum of 1000 results. If you’ve saved the$usageData
variable as covered in the previous section, you can confirm it by using running this command$usageData.UsageAggregations.count
.What if there are more than 1000 results? You’re going to have to do a little more work.
Knowing how much you’re spending is critical in an Op-X world like Azure or AWS.