Skip to content

Intermittent errors from the Get-AzEnrollmentAccount cmdlet when running deploy.ps1 #3

@CloudViking

Description

@CloudViking

Sample run of deploy.ps1

Creating new resource group: robust-rg

ResourceGroupName : robust-rg
Location          : westus2
ProvisioningState : Succeeded
Tags              :
                    Name        Value 
                    ==========  ======
                    CostCenter  123456

ResourceId        : /subscriptions/c0fa65da-c191-43bf-8fef-27730db10042/resourceGroups/robust-rg

Gathering EA Information
======== Enterprise Agreement Enrollments ========
Get-AzEnrollmentAccount : Object reference not set to an instance of an object.
At C:\Users\hbendana\OneDrive - Microsoft\code\github\SubscriptionBuilder\deploy.ps1:44 char:6
+     (Get-AzEnrollmentAccount).ObjectId | ForEach-Object -Begin {$i =  ...
+      ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : CloseError: (:) [Get-AzEnrollmentAccount], NullReferenceException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Billing.Cmdlets.EnrollmentAccounts.GetAzureRmEnrollmentAccount

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions