Azure-docs: Select-AzureSubscription is not supported in the latest Az CLI

Created on 2 Jan 2020  Â·  11Comments  Â·  Source: MicrosoftDocs/azure-docs

It's now Select-AzSubscription


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 cognitive-servicesvc cxp product-feedback triaged

Most helpful comment

@dcaro the link is updated in another push that'll go live later today ;).

All 11 comments

@assafi Thanks for the feedback. We are investigating the issue and will update you shortly.

We have assigned this issue to the author to review further and take the right course of action.
@erhopf Could you please check on this.

Awaiting confirmation from Greg. This is in our backlog.

@erhopf @assafi Please follow the below document for Set-AzContext.
https://docs.microsoft.com/en-us/powershell/module/az.accounts/set-azcontext?view=azps-3.2.0
The Select-AzSubscription is alias but not cmdlet. The cmdlet of that alias Select-AzSubscription is Set-AzContext.
The notion of context is richer than simply the subscription, the following article has more details about context: https://docs.microsoft.com/en-us/powershell/azure/context-persistence.
image

@ram-msft - Apologies, I don't have the subject matter expertise with this tool, and the document you've sent over is rather confusing in the context of the user request above. As such, I'm going to reassign this to you. It seems like there might be a larger problem, where Select-AzSubscription isn't documented in the article you've sent, and there is still existing documentation for the command that's present in the original doc referenced.

reassign: ram-msft

@assafi Raised a feature request to Azure Power shell team to update the document for Select-AzSubscription and obsolete the Select-AzureSubscription document.

https://github.com/Azure/azure-powershell/issues/10848

We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

@erhopf @ram-msft the Select-AzureSubscription cmdlet does not work in CloudShell you should use the Set-AzContext. IF you want to use the subscription name, you can use the following command:
Get-AzSubscription -SubscriptionName <SubscriptionName> | Set-AzContext
cc @Minewiskan

@dcaro @ram-msft @assafi - We've made an update in https://github.com/MicrosoftDocs/azure-docs-pr/pull/101566. This should be reflected in the documentation > 3pm PT.

@erhopf please see my comment, the link to the reference documentation needs to be updated.

@dcaro the link is updated in another push that'll go live later today ;).

Was this page helpful?
0 / 5 - 0 ratings