This PowerShell Azure tutorial will discuss how to fix the error. The term ‘connect-azaccount’ 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. I encountered this while running the PowerShell command to connect to Microsoft Azure.
Table of Contents
Connect-azaccount not recognized
Recently, while I was trying to connect to Microsoft Azure from PowerShell by running the below command, I was surprised to see the connect-azaccount was not found.
Connect-AzAccountI got an error, and the complete error message is as below
Connect-AzAccount: The ‘Connect-AzAccount’ command was found in the module ‘Az.Accounts’, but the module could not be loaded. For more information, run ‘Import-Module Az. Accounts’
The error looks like the following:

Connect-azaccount is not recognized [Solution]
Solution-1
To fix the issue connect-azaccount : the term ‘connect-azaccount’ is not recognized as the name of a cmdlet, run the below command in PowerShell.
Import-Module Az.AccountsOnce you execute the above cmdlets, you can connect to Azure from PowerShell.
When you run the command, it will ask you for the username and password, and you can see the output below:

Solution-2
If the above solution didn’t work for you and connect-azaccount is not working for you, then try the below steps
- First, run the below PowerShell cmdlet to install Module Az.
Install-Module Az
2. The second step is to import the Module Az using the below PowerShell cmdlet.
Import-Module Az![the term connect azaccount is not recognized connect-azaccount : the term 'connect-azaccount' 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 + connect-azaccount + ~~~~~~~~~~~~~~~~~ + categoryinfo : objectnotfound: (connect-azaccount:string) [], commandnotfoundexception + fullyqualifiederrorid : commandnotfoundexception](https://azurelessons.com/wp-content/uploads/2023/06/the-term-connect-azaccount-is-not-recognized.jpg)
3. Now Run the below PowerShell cmdlet to connect to the AzAccount.
Connect-AzAccountYou may like the following tutorials:
- Connect-azaccount
- The term ‘connect-azuread’ is not recognized as the name of a cmdlet function Azure
- connect-azaccount interactivebrowsercredential authentication failed
Wrapping Up
In this tutorial, we learned how to fix the error; the term ‘connect-azaccount’ is not recognized as the name of a cmdlet, that comes while connecting to Azure from PowerShell.
Hope you have enjoyed this article and this solution will help you to fix your issue as well !!!
I am Bijay, a Microsoft MVP (10 times) having more than 17 years of experience in the software industry. During my IT career, I got a chance to share my expertise in SharePoint and Microsoft Azure, like Azure VM, Azure Active Directory, Azure PowerShell, etc. I hope you will learn from these Azure tutorials. Read more
