有没有办法使用 powershell 获取特定资源组的计费信息(花费的时间和金钱)?
最佳答案
您可以使用Get-UsageAggregates
cmdlet Microsoft Azure Powershell 来获取账单信息。
请参阅此博客文章,了解如何使用此 Cmdlet 的示例:http://blogs.technet.com/b/keithmayer/archive/2015/06/30/export-azure-subscription-usage-with-new-billing-api-and-powershell.aspx .
首先使用Login-AzureRmAccount
cmdlet,然后使用以下命令获取数据。
Get-UsageAggregates -ReportedStartTime "2016-01-01"-ReportedEndTime "2016-01-07"-AggregationGranularity "Daily"-ShowDetails $true
使用上述信息和从 RateCard API
获得的数据,您也可以得到发生的费用。
关于powershell - 使用 powershell 获取 Azure 账单信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34674751/