Skip to content

Commit

Permalink
Update AzureTopologyDiagrammerAzureHelpers.ps1
Browse files Browse the repository at this point in the history
Fixed condition where subscription ID would not be set in the event only one subscription was found.
  • Loading branch information
weskroesbergen committed Dec 2, 2015
1 parent 1eced3d commit 5372fe4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion AzureTopologyDiagrammerAzureHelpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ Function Connect-AzureAccount ($tenant = "common", $env="prod")
Write-Host "You selected $($choiceList[$answer].Label.Substring(1))..."
$global:subscriptionId = $choiceList[$answer].HelpMessage
}
else
{
$global:subscriptionId = $subscriptions[0].subscriptionId
}
}
}

Expand Down Expand Up @@ -230,4 +234,4 @@ Function Execute-ResourceManagerQuery($ApiAction, $QueryBase, $ApiVersion="2015-
Write-Host "Not connected to an AAD tenant. First run Connect-AzureAccount." -ForegroundColor Yellow
}
return $response
}
}

0 comments on commit 5372fe4

Please sign in to comment.