Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
952 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello:
Is there a way to get the Cost of single Azure Resource Group (only) via PowerShell? Of course, the cost should include the cost of all resources in this RG...
Thank you!
Hi @Oleg Aronov ,
maybe this is helpful.
You need to install and import the Az PowerShell module for this.
# All information
Get-AzConsumptionUsageDetail -ResourceGroup "demo-rg" -StartDate 2021-12-01 -EndDate 2022-01-27 | Select-Object *
# Just some details
Get-AzConsumptionUsageDetail -ResourceGroup "demo-rg" -StartDate 2022-01-01 -EndDate 2022-01-27 | Select-Object InstanceName, Currency, PretaxCost | Sort-Object -Property PretaxCost -Descending
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten