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, function, script. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
The term ‘Login-AzureRmAccount’ is not recognized as the name of a cmdlet
Recently while trying to interact with Azure storage account using the below cmdlet using Powershell, I got the error The term ‘Login-AzureRmAccount’ is not recognized.
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)
Solution
To fix this issue you need to follow the below steps
Step-1:
Run your PowerShell ISE or Windows PowerShell as an administrator mode

Step-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.
Step-3:
Once you will install the AzureRM module successfully by following the above article, Now try to run the below PowerShell script again, You will get the Popup window to enter your Azure credentials

You may also like the below tutorials
Conclusion
Well, in this Azure tutorial, we discussed how to fix the error “The term ‘Login-AzureRmAccount’ is not recognized as the name of a cmdlet, function, script. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.“