In this PowerShell azure tutorial, we will discuss how to fix the error, the term ‘connect-azaccount’ is not recognized as the name of a cmdlet that comes while running the PowerShell command to connect to Microsoft azure.
Table of Contents
The term ‘connect-azaccount’ is not recognized
Recently, while I was trying to connect to Microsoft Azure from PowerShell by running the below command
I got an error which says:
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 below:
The term ‘connect-azaccount’ not recognized [Solution]
To fix the issue run the below command in PowerShell.
Once you execute the above cmdlets, you will be able to connect to Azure from PowerShell.
When you will run the command, it will ask you the username and password and you can see the output like below:
If the above solution didn’t work for you then try the below steps
- First run the below PowerShell cmdlet to install the Module Az.
2. The second step is to import the Module Az using the below PowerShell cmdlet.
3. Now Run the below PowerShell cmdlet to connect to the AzAccount.
You may like following tutorials:
- The term ‘get-aduser’ is not recognized as the name of a cmdlet in Windows 10 PowerShell
- The term ‘connect-azuread’ is not recognized as the name of a cmdlet function Azure
- How to add bulk guest users in Azure AD B2B from Azure Portal and PowerShell
- The ‘New-AzResourceGroup’ command was found in the module ‘Az.Resources’
- Powershell error – Az.Resources.psm1 cannot be loaded because running scripts is disabled on this system
- The term ‘Remove-AzureVM’ is not recognized as the name of a cmdlet
- Because of protocol error (code 0x112d) the remote session will be disconnected
- The term ‘Get-AzureADDirectorySettingTemplate’ is not recognized as the name of a cmdlet
In this tutorial, we learned how to fix the error, the term ‘connect-azaccount’ is not recognized as the name of a cmdlet function script file 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 !!!