Skip to content

Commit 37f065b

Browse files
author
BradleyBartlett
committed
fix bug in Unregister-AzsEnvironment around gathering cloudId
1 parent 0759315 commit 37f065b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Registration/RegisterWithAzure.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ Function UnRegister-AzsEnvironment{
779779
foreach ($resource in $registrationResources)
780780
{
781781
$resourceObject = Get-AzureRmResource -ResourceId "/subscriptions/$($AzureContext.Subscription.SubscriptionId)/resourceGroups/$ResourceGroupName/providers/Microsoft.AzureStack/registrations/$($resource.name)"
782-
$resourceCloudId = (($resourceObject.Properties.ToString()) | ConvertFrom-Json).cloudId
782+
$resourceCloudId = $resourceObject.Properties.CloudId
783783
if ($resourceCloudId -eq $stampInfo.CloudId)
784784
{
785785
$registrationResource = $resourceObject

0 commit comments

Comments
 (0)