Get-UsageAggregates PowerShell cmdlet的“ continuationtoken”问题

时间:2019-05-21 08:24:33

标签: azure azure-powershell azure-billing-api

我正在关注博客,以获取订阅的使用详细信息。

https://blogs.technet.microsoft.com/keithmayer/2015/06/30/export-azure-subscription-usage-to-csv-with-new-billing-api-and-powershell/

“使用Get-UsageAggregates通过PowerShell导出Azure使用情况”(第1部分)

我收到以下错误:

Get-UsageAggregates : InvalidInput: Parameter continuationtoken was missing or had an unacceptable value.
At line:30 char:18
+ ... usageData = Get-UsageAggregates -ReportedStartTime $reportedStartTime ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-UsageAggregates], CloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.UsageAggregates.GetUsageAggregatesCommand

如果有人解决了这个问题,请让我知道如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

我用$ null替换了“”,它似乎可以用于continuationToken。