powershell - 使用 powershell 获取 Azure 账单信息?

标签 powershell azure powershell-cmdlet

有没有办法使用 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

enter image description here

使用上述信息和从 RateCard API 获得的数据,您也可以得到发生的费用。

关于powershell - 使用 powershell 获取 Azure 账单信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34674751/

相关文章:

Powershell 前景色

azure - databricks - 在终端 'export DATABRICKS_CONFIG_FILE="dbfs :/FileStore/tables/partition. csv' 中执行命令时没有响应

c# - 尝试将图像保存到 Azure 服务器的文件系统中时出错 - GDI+ 中发生一般错误

powershell - WinSCP XML 日志与 PowerShell 确认多个文件上传

sql-server - SSAS 使用 PowerShell 将成员添加到服务器管理员角色

typescript - 找不到命名空间 'amp'

powershell - Azure Powershell 失败并出现模糊错误 : One or more errors occurred

c# - Cmdlet 通过管道一次传递参数列表,而不是单个列表项

powershell - 如何获取正在执行的cmdlet的当前目录

powershell - 在SharePoint网站上添加新的快速启动导航链接