Share via


Managing AzureRM module versions for Build and Release Management workflows

Azure Resource group deployment task and Azure File Copy task that are part of Build and Release Management workflow task catalogue take dependency on Azure RM modules and the command-lets. Azure has started publishing the Azure modules at a more faster cadence through PowerShell gallery. Hence there can be instances when you would need your Build or Release automation agent to have specific version of Azure RM modules to meet your needs or to maintain compat with the Azure resource group and Azure file copy tasks. If you need a specific version of module then follow below steps to install right version of the module in your Build or Release Automation agent. The best way to find out supported Azure RM module version for these Azure tasks is to look at their ReadMe in github. You can also reach out to RM_Customer_Queries@Microsoft.com

 

Pre-requisite:

I am assuming you have the PowerShellGet Module installed in your automation agent. If not follow the instructions in PowerShellGallery page to install the module. This provides the Install-module command-let that you would need to install AzureRM.

 

a) To check/verify the version of AzureRM module that is present in your machine

Get-Module -Name AzureRM -ListAvailable

 

b) To install a specific module execute below commands

Install-Module -Name AzureRM -RequiredVersion <ver>. You can find the versions available from PowerShell gallery page.

Install-AzureRM

Refer MSDN for more details on the command.

 

c) To uninstall existing versions execute below commands

Uninstall-AzureRM

Uninstall-Module -Name AzureRM

Post uninstall you should not have any modules present in the modules install path. This is typically in C:\Program Files\WindowsPowerShell\Modules. But you can find the actual path in your machine using Get-Module command.