From 37f065bed183301c1a60923915c14a1216b79ff9 Mon Sep 17 00:00:00 2001 From: BradleyBartlett Date: Fri, 30 Nov 2018 10:35:43 -0800 Subject: [PATCH] fix bug in Unregister-AzsEnvironment around gathering cloudId --- Registration/RegisterWithAzure.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Registration/RegisterWithAzure.psm1 b/Registration/RegisterWithAzure.psm1 index db721f95..6d7b2fea 100644 --- a/Registration/RegisterWithAzure.psm1 +++ b/Registration/RegisterWithAzure.psm1 @@ -779,7 +779,7 @@ Function UnRegister-AzsEnvironment{ foreach ($resource in $registrationResources) { $resourceObject = Get-AzureRmResource -ResourceId "/subscriptions/$($AzureContext.Subscription.SubscriptionId)/resourceGroups/$ResourceGroupName/providers/Microsoft.AzureStack/registrations/$($resource.name)" - $resourceCloudId = (($resourceObject.Properties.ToString()) | ConvertFrom-Json).cloudId + $resourceCloudId = $resourceObject.Properties.CloudId if ($resourceCloudId -eq $stampInfo.CloudId) { $registrationResource = $resourceObject