Azure PowerShell 1.0 Preview Installation on Down-level PowerShell Systems Using PackageManagement Cmdlets

If you have not seen this yet, Azure PowerShell 1.0 is in preview. If you have been using Azure Resource Manager cmdlets, there is a breaking change between 0.9.8 and 1.0. All Azure Resource Manager cmdlets in 1.0 have the AzureRM prefix. Also, there are different modules for different aspects of Azure management. One method you can get Azure PowerShell 1.0 Preview is to use the PackageManagement cmdlets. Azure blog quotes this saying:

While the official blog post says that WMF 5.0 is required, it isn’t really necessary. This is because there is a PackageManagement preview available for down-level PowerShell versions. 🙂

Once you download and install this PackageManagement preview on PowerShell 3.0 or 4.0 systems, you will get access to cmdlets such as Find-Module and Install-Module.

Here is $PSVersionTable from my system.

1
Find-Module -Name Azure*

Note: The above command will return Azure related modules written by community as well and not just Azure SDK team.

Let’s go ahead and install all modules with AzureRM prefix (24 of them at the time of writing!)

1
2
$AzureModules = Find-Module -Name AzureRM* | Select-Object -Expand Name
Install-Module -Name $AzureModules -Force

Or, you can install only AzureRM module using the Install-Module cmdlet and then use the Install-AzureRM cmdlet to install remaining Azure Resource Manager modules. This cmdlet is an alias for the Update-AzureRM cmdlet.

Finally, verify that all the AzureRM modules got installed and the cmdlets are available.

Share on: