The term ‘Add-AzureAccount’ is not recognized

Let us discuss how to fix the error “The term ‘Add-AzureAccount’ is not recognized” which I got while executing the Add-AzureAccount PowerShell command.

The term ‘Add-AzureAccount’ is not recognized

I was executing the below PowerShell command recently and got this error.

Add-AzureAccount

The complete error message is as follows.

Add-AzureAccount: The term ‘Add-AzureAccount’ 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

  • Add-AzureAccount
  • ~~~~
    • CategoryInfo : ObjectNotFound: (Add-AzureAccount:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

You can see the same error in the below screenshot.

The term 'Add-AzureAccount' is not recognized

The term ‘Add-AzureAccount’ is not recognized [Solved]

Follow the below steps to fix this error.

  1. Open the PowerShell ISE with “Run as administrator” mode.
  2. Execute the below PowerShell command to install the Azure module.
Install-Module Azure

Click on the Yes to All button.

Install-Module Azure

It took a few seconds to complete the installation.

'Add-AzureAccount' is not recognized

3. Re-ran the below command; this time, the command was executed successfully without any issues.

Add-AzureAccount

You can see the same successful output in the below screenshot.

the term 'add-azureaccount' is not recognized as the name of a cmdlet,

Wrapping Up

We discussed fixing the error “The term ‘Add-AzureAccount’ is not recognized,” which I got while executing the Add-AzureAccount PowerShell command. Thanks for reading this article !!!