For quite some time I have been working with azure automation a lot and recently one of the requirements is to update the global modules (default modules) available in the azure automation account. Refer the screenshot attached. At the time of writing, the version of the modules would be 1.0.3 which is quite a old one. There are lot of improvements and new cmdlets are added to the latest version of the modules. So, I thought updating the global modules would be same as any custom developed modules. By using the azure PowerShell cmdlets such as New-AzureRmAutomationModule or Set-AzureRmAutomationModule if one already exists. This is not the same procedure to update the global modules. Hence this article will help to achieve this.
Below are the simple instructions to update the global modules available in the azure automation assets
Make sure your automation account have got run as account configured as shown in the below screen
Click on the runbooks on the automation account and search for Update-ModulesInAutomationToLatestVersion from the powershell gallery source as shown below
Select the module and import as shown below
Once import process is completed, select the run book click on Edit and Publish. As shown below
Once its published, now you can start the runbook , Please supply all the required parameters refer the below
Now, watch the job output windows for the status of completed. You have all the modules to the latest version as shown below.
Module version updated and you can see more cmdlets available when compared to the first screen.
Have a fun automation in Microsoft Azure. Hope you enjoyed this article. Your feedback is always appreciated.