In this Azure tutorial, we will discuss how to fix the error, the term ‘login-azurermaccount’ is not recognized as the name of a cmdlet. I got it while executing the login-azurermaccount command.
Table of Contents
Login-AzureRmAccount is not recognized
I got this error while trying to interact with the Azure storage account using the below cmdlet using Powershell, I got this error.
Login-AzureRmAccount
$Keys1 = "Coro2SvGOTD+nT3YdaKCrnauzWvHMF6BmuD9PfSKtNJWt6etOMjkwg6KNSQ39zOOQcMpDSjyBKHdALGIg6gZ4Q=="
$StorageContext1 = New-AzureStorageContext -StorageAccountName sqlvaqrc7kssdx4eus -StorageAccountKey $Keys1
$containerName1 = "democontainer1";
Set-AzStorageBlobContent -File "D:\Bijay\Upload9.txt" `
-Container $containerName1 `
-Blob "Upload9.txt" `
-Context $StorageContext 
The complete error message was as below
The term ‘Login-AzureRmAccount’ 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.
+ CategoryInfo : ObjectNotFound: (Login-AzureRmAccount: String)
Login-AzureRmAccount is not recognized [Solved]
To fix this issue, you need to follow the below steps
1. Run your PowerShell ISE or Windows PowerShell as an administrator mode

2. You need to install the AzureRM module now. To install and fix this issue, follow my article. The term ‘New-AzureStorageContext’ is not recognized.
3. Once you install the AzureRM module successfully by following the above article, try to run the below PowerShell script again. You will get the Popup window to enter your Azure credentials

Login-AzureRmAccount is not recognized – Video Tutorial
You may also like the tutorials below
Conclusion
In this Azure tutorial, we discussed how to fix the error “the term login-azure account is not recognized. “ Hope this will help you.
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
