2017-07-18

Keeping AzureRM PowerShell cmdlets up to date


Microsoft has been updating the AzureRM PowerShell cmdlets on a nearly monthly basis. To keep them up to date on your PC uninstall the old version(s) then install the newest version.
First, open PowerShell as an Administrator.

Image showing 'Run as Administrator'
Uninstall old verion(s):
Get-InstalledModule -Name "AzureRM" -AllVersions | Uninstall-Module

In the command above we first find all installed versions of the AzureRM cmdlets, then pipe that into Uninstall-Module to remove the module. Install newest module:
Install-Module -Name "AzureRM"

If you get the warning message:
Untrusted repository You are installing the modules from an untrusted repository. If you trust this reposito InstallationPolicy value by running the Set-PSRepository cmdlet. Are y
ou sure you want 'PSGallery'? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"):
You can prevent this in the future by running:
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

No comments:

Post a Comment