The term ‘Select-AzureSubscription’ is not recognized as the name of a cmdlet

In this Azure tutorial, we will see how to fix the error “ The term ‘Select-AzureSubscription’ is not recognized as the name of a cmdlet “. Which I got while trying to select my Azure Subscription using PowerShell ISE.

The term ‘Select-AzureSubscription’ is not recognized as
the name of a cmdlet

Recently, I was trying to select my Azure subscription using my PowerShell ISE, But I got the error The term ‘Select-AzureSubscription’ is not recognized as the name of a cmdlet. I was executing the below PowerShell cmdlet to select my Azure Subscription.

PS C:\WINDOWS\system32> Select-AzureSubscription -SubscriptionName "Visual Studio Enterprise"

You can see below for the error message

The term 'Select-AzureSubscription' is not recognized as the name of a cmdlet

The complete error message was as below

Select-AzureSubscription: The term ‘Select-AzureSubscription’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • Select-AzureSubscription -SubscriptionName “Visual Studio Enterprise”
  • ~~~~~~~~
    • CategoryInfo : ObjectNotFound: (Select-AzureSubscription:String) [], C
      ommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

The term ‘Select-AzureSubscription’ is not recognized as
the name of a cmdlet
[Solved]

To fix this issue or to select your Azure Subscription, Follow the below steps

Open the PowerShell ISE or Windows PowerShell as Run as Administrator mode

'Select-AzureSubscription' is not recognized as the name of a cmdlet

You can run the Select-AzSubscription instead of Select-AzureSubscription with the SubscriptionName or subscritionID parameter as shown below.

PS C:\WINDOWS\system32> Select-AzureSubscription -SubscriptionName "Visual Studio Enterprise"

or you can also use the PowerShell command with the SubscriptionId parameter. Change your Azure subscription id accordingly.

Select-AzSubscription -SubscriptionId 'xxxxxxxx-dee5-4518-xxxx-feaa72a5cbd1'

You can see it below, we got the expected out put after running the above PowerShell cmdlet

The term 'Select-AzureSubscription' is not recognized

When I ran the PowerShell command with the SubscriptionId, also we got the expected output

Select-AzureSubscription is not recognized

You may also like following the below articles

Wrapping Up

Well, In this article, we discussed how to fix the error The term ‘Select-AzureSubscription’ is not recognized as the name of a cmdlet. Hope this information will help you !!!