How to fix “Connect-AzAccount - The term 'Connect-AzAccount' is not recognized as the name of a cmdlet, function, script file, or operable program.

[Fixed]: The term ‘Connect-AzAccount’ is not recognized as the name of a cmdlet

No comments

Loading

In this PowerShell troubleshooting article, we will learn 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.”

We will get this error if the PowerShell Azure module is not installed in your machine and trying to execute the azure PowerShell command, then we will get this error.

The term 'Connect-AzAccount' is not recognized as the name of a cmdlet error
The term ‘Connect-AzAccount’ is not recognized as the name of a cmdlet error

How to fix the issue Connect-AzAccount : The term ‘Connect-AzAccount’ is not recognized as the name of a cmdlet, function, script file

In order to fix this, the term ‘Connect-AzAccount’ is not recognized as the name of a cmdlet issue, we need to execute the below PowerShell command in order:

  1. Install Azure module in your local PowerShell (open PowerShell command prompt with the administrator mode)
Install-Module Az

2. Import the Azure module by executing the below command:

Import-Module Az

3.  Now run the below command to connect to the Azure account:

Connect-AzAccount

Summary: The term Connect-AzAccount is not recognized

Thus, in this article, we have learned about how to fix the “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” error.

See Also: SharePoint PowerShell

You may also like the following SharePoint PowerShell tutorials:

Buy SharePoint Online & Office 365 administration eBook from here:

Buy SharePoint Online & Office 365 Administration eBook

About Post Author

Do you have a better solution or question on this topic? Please leave a comment