How to get the billing details of an azure subscription using the power shell script.

Brass Contributor

Hello All,

Please Provide a power shell script that will help me to get the billing details of an azure subscription.

1 Reply

@Prashant SharmaHere is a link to a script I wrote that pulls billing consumption data from a subscription you could use as a reference.  It then writes that data to a Log Analytics Workspace.  That data could be written someplace else using whatever method you need.  

 

It requires the Azure Consumption PowerShell Module.  

 

https://github.com/tsrob50/SendCostDataLogAnalytics/tree/master

 

Thanks