Не удается запустить Get-AzureRmBillingInvoice в книгах выполнения автоматизации - PullRequest
0 голосов
/ 04 апреля 2020

Я пытаюсь создать простую книгу запусков для генерации последней накладной с помощью команды «Get-AzureRmBillingInvoice -Latest». Тем не менее, команда продолжает терпеть неудачу каждый раз с этой ошибкой:

Get-AzureRmBillingInvoice : Object reference not set to an instance of an object.
At line:27 char:1
+ Get-AzureRmBillingInvoice -Latest
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzureRmBillingInvoice], NullReferenceException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Billing.Cmdlets.Invoices.GetAzureRmBillingInvoice

В соответствии с предложениями в других потоках, я также пробовал Resolve-AzureRmError, и вот результат.

InnerException   : False
Exception        : System.NullReferenceException: Object reference not set to an instance of an object.
                      at Microsoft.Azure.Commands.Billing.Cmdlets.Invoices.GetAzureRmBillingInvoice.ExecuteCmdlet()
                      at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Message          : Object reference not set to an instance of an object.
StackTrace       :    at Microsoft.Azure.Commands.Billing.Cmdlets.Invoices.GetAzureRmBillingInvoice.ExecuteCmdlet()
                      at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HelpLink         : 
ErrorDetails     : 
ErrorCategory    : CloseError: (:) [Get-AzureRmBillingInvoice], NullReferenceException
InvocationInfo   : System.Management.Automation.InvocationInfo
ScriptStackTrace : at <ScriptBlock>, <No file>: line 27

Я перепробовал все, но проблема все еще остается. Команда отлично работает на CLI Azure на моем компьютере и в Cloud Shell

...