Upgrade the Azure module in Azure Automation

This post was updated 13. January 2015 to reflect both Azure and AzureResourceManager modules

When we create a new Automation Account, you get the Azure module by default, and if you need to upgrade it before Microsoft might do it, follow these steps.

First, we upgrade our own Azure module locally. To download the latest version follow the download link at this page http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/

Then go to C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell and create a ZIP file of the Azure catalog, and save it as Azure.zip

Then, we go to C:`Program Files (x86)\Microsoft SDKs\Azure\PowerShell.

Now, we have to create a ZIP folder for each of the modules. If using Normal compression, it should be less than 30MB, which is the max file size we can upload to Azure Automation.

First we open the ResourceManager folder, and create a ZIP file of the AzureResourceManager. Save the ZIP file to a known location. Then we go up one level aging and enter the ServiceManager folder. Here we create another ZIP file of the Azure catalog. Make sure to save it to a known location.

Now you have to open your Azure Management Portal and then navigate to Automation, and enter the Automation Account you want to upgrade.

01 The Assets tab

There, click on the ASSETS tab, and we can see the Azure module, and the Last Update date as of this writing is March 19, 2014. The latest release for the Azure module is April 3, 2014, and the modified date for the module files is from the day before, so I guess this one is ready for an upgrade.

On the bottom of the page, you find a button named Import Module. Press it, and browse for the compressed Azure module you created earlier, and then press OK.

02 - Select module to upload

When prompted, accept to overwrite the Global version of this module. As we can see, the module is then uploaded, and the extraction begins.

03 - Upload and extraction in prosess

After a few seconds or minutes the module is ready for usage. In the Asset overview, we also see that the last update date has changed. Next, we do the same process with the AzureResourceManager.zip file.

04 - Module updated

Now all the new commands should be available for us. To verify that we have the expected commands available, we create a test runbook with the following code

workflow test
    Write-Output "Azure module as follow:"
    Get-Command -Module Azure
    Write-Output "AzureResourceManager module as follow:"
    Get-Command -Module AzureResourceManager


In the Output pane we should now see all the available commands


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s