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 this error. 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 the error message below

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

Solution

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

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

select-azuresubscription

2. You can run the Select-AzSubscription instead of Select-AzureSubscription with the SubscriptionName or subscription ID 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 output after running the above PowerShell cmdlet.

the term 'select-azsubscription' is not recognized as the name of a cmdlet

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

select-azsubscription

You may also like the following articles below

Wrapping Up

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

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!