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 |