If your Run Books in Azure Automation rely on any of the new versions of the AzureRM PowerShell module, then they may start to fail! That’s because all the modules that get pre-added in Azure Automation point to an older version of AzureRM modules… Follow the steps in this post to fix failing module upgrade…

The screen shot below shows you the Module pane in AzureAutomation, you could click the update azure modules button to auto upgrade the modules. This functionality allows you to force an upgrade of the modules, this would update the modules to a version that are compatible with each other. However, this functionality seems to be broken…


Error Message



After hours of troubleshooting, it came to light that the AzureRm.Profile and AzureRM.Automation should point to the same version, if they are on separate versions then Azure Automation silently starts to fail the module upgrade process. This can however be fixed by deleting the AzureRM.Profile module from the modules list and then forcing the upgrade of the modules.


This will download the AzureRM.Profile module to the correct version that matches the version of AzureRM.Automation and then continuous to perform the upgrade of all the modules successfully.

The fix is simple, but just putting this out there because it took hours to figure the root cause…


About author
Tarun Arora
Tarun Arora
Tarun Arora is obsessed with high-quality working software, DevOps, Continuous Delivery and Agile. His core strengths are Azure, Azure DevOps, PowerShell, SQL and WPF. He is a Microsoft MVP in Visual Studio Development Tools and the author of 'DevOps & ALM with TFS 2015'.
We Are
  • onlyutkarsh
    Utkarsh Shigihalli
    Microsoft MVP, Technologist & DevOps Coach

  • arora_tarun
    Tarun Arora
    Microsoft MVP, Author & DevOps Coach at Avanade

Do you like our posts? Subscribe to our newsletter!
Our Book