Skip to content

Commit eba2919

Browse files
authored
Merge pull request #271 from troettinger/vnext
fix get infrastructure role healths
2 parents 53d456d + 4d4e1d2 commit eba2919

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Infrastructure/AzureStack.Infra.psm1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,9 @@ function Get-AzsInfrastructureRoleHealths {
763763
[string] $Location
764764

765765
)
766-
767-
$resourceType = "Microsoft.InfrastructureInsights.Admin/regionHealths/serviceHealths/472aaaa6-3f63-43fa-a489-4fd9094e235f/resourceHealths"
766+
$RP=Get-AzsResourceProviderHealths -Location $location|where {$_.DisplayName -eq "Capacity"}
767+
$ID=$RP.RegistrationID
768+
$resourceType = "Microsoft.InfrastructureInsights.Admin/regionHealths/serviceHealths/$ID/resourceHealths"
768769

769770
$rolehealth = Get-AzsInfrastructureResource -Location $Location -resourceType $resourceType
770771
$rolehealth.Properties

0 commit comments

Comments
 (0)