Wednesday, August 23, 2017

Upgrading AzureRM PowerShell Module

In my first episode, I am going to explain something simple yet during my endless searching on the net I could not find a a clear set of instructions on how to upgrade the AzureRM PowerShell module, and clean-up after the update. So let's get right to it for the sake of this exercise we're going to upgrade from 4.2.1 o 4.3.1. 

The first thing we will do is update the existing AzureRM module with the following command(s) (must be run in an elevated PowerShell command window:


1
2
Update-Help -Force
Update-Module AzureRM -Verbose


You will then end up with two versions of the AzureRM module side-by-side. Run this command to validate.


1
Get-InstalledModule -Name "AzureRM" | Select-Object -Property Name,Version,Repository

Name    Version Repository
----    ------- ----------
AzureRM 4.2.1   PSGallery
AzureRM 4.3.1   PSGallery


Now, to remove the previous version of the module. Run the following command.
1
Get-InstalledModule -Name "AzureRM" -RequiredVersion 4.2.1 | Uninstall-Module

Upgrading AzureRM PowerShell Module

In my first episode, I am going to explain something simple yet during my endless searching on the net I could not find a a clear set of ins...