Skip to content
Azure Lessons
Azure Lessons
  • Home
  • AWS
  • Azure VM
  • Azure AD
  • Azure tutorial
    • Azure Cognitive Services
    • Azure Machine Learning
    • Azure DevOps

The term ‘Login-AzureRmAccount’ is not recognized as the name of a cmdlet error

December 16, 2020July 3, 2020 by Bijay Kumar

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 term 'Login-AzureRmAccount' is not recognized as the name of a cmdlet

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

'Login-AzureRmAccount' is not recognized

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

The term 'Login-AzureRmAccount' is not recognized as the name of a cmdlet, function, script.

You may also like the below tutorials

  • No match was found for the specified search criteria and module name ‘MSOnline’

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.“

Post navigation
The term ‘New-AzureStorageContext’ is not recognized error
Method ‘get_SerializationSettings’ error when Login-AzureRMAccount

Follow Us

Follow us on Twitter Subscribe us on Youtube

Recent Posts

  • How to assign a static Public IP to Azure VM
  • Azure PowerShell Get VM Public IP
  • Azure virtual machine auto shutdown
  • Azure PowerShell vs Azure CLI
  • Azure PowerShell List Virtual Machines
  • About
  • Contact
  • Privacy Policy
  • Sitemap
© 2022 Azure Lessons