Forum Discussion
robertpaegelow
Feb 26, 2019Brass Contributor
[Guide] Automation Runbook – Retrieve total cost of resourcegroup or subscription
Hello geeks!
I wanted to share a script i use on a daily basis that i think some of you have use of.
What this script/runbook achieves:
This script retrieves all resources in a resourcegroup, sums up the values of each resource, and emails the total cost via gmail SMTP.
What i get in the mail once a day:
Link to my blog with the complete script:
http://paegelow.se/azure-automation-runbook-retrieve-total-cost-of-resourcegroup-or-subscription/
Required modules:
- AzureRM.Automation
- AzureRM.Consumption
- AzureRM.Profile
- AzureRM.Resources
- AzureRM.Storage
- AzureRM.Compute
Guide on how to create an azure runbook:
https://docs.microsoft.com/en-us/azure/automation/automation-quickstart-create-runbook
No RepliesBe the first to reply