Simpler way to switch between subscriptions than provided by documentation
Closed this issue · 1 comments
jothki commented
This page provides this method for changing between subscriptions:
$context = Get-AzSubscription -SubscriptionId ...
Set-AzContext $context
I'm not sure if this capability was added since the documentation was created, but this operation can be done simply with
Set-AzContext -Subscription ...
This method skips an unnecessary call to the API, and would likely be easier for new users to understand and work with.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 8daf4bec-80e7-afb2-f093-6e8f7ddc03bc
- Version Independent ID: 034bb1b6-29ba-0c06-b959-b09a575c456e
- Content: Manage Azure subscriptions with Azure PowerShell
- Content Source: docs-conceptual/azps-7.4.0/manage-subscriptions-azureps.md
- Service: azure-powershell
- GitHub Login: @mikefrobbins
- Microsoft Alias: mirobb
Grace-MacJones-MSFT commented
thanks for bringing this to our attention. I have assigned the issue to the content author to evaluate and update as appropriate