We are excited to announce a new version of the installer for Azure PowerShell implementing major improvements based on the feedback of the previous version.
Azure PowerShell contains many sub modules, total number add up to 125. These modules are released as collection in Az and AzPreview. You can either install all of them or install each sub module individually. Installing all modules usually takes several minutes to finish. You may update the Az modules from time to time if you want to keep up with the rapid changes of the modules. The default update mechanism does not remove previous versions. After several updates, obsolete modules remain on machine and unfortunately, uninstallation can only be performed one at a time, a problem that many customers have reported.
Last year, we released Az.Tools.Installer to address the version and module management issue. The installer module provides 3 cmdlets Install-AzModule, Update-Azmodule and Uninstall-AzModule. We now provide the capability to manage sub modules using the name of the service and using the version of Az for reference. One cmdlet can now clean the environment or keep all installed modules update-to-date.
In the new version, we simplify functionality and add a few new features that are more practical to use.
This cmdlet improves and simplifies the overall installation experience for Azure PowerShell. For advanced scenarios the Install-Module cmdlet remains available. With this goal, we did the following improvements:
We removed “-MaxinumVersion” and ”- MinimumVersion” as we find people are more used to specify the exact Az version they want.
We added a new parameter “-UseExactAccountVersion” to use the required minimum version of Az.Accounts rather than the latest one.
We changed the behavior of “-RemovePrevious”. Previously all installed Az modules would be removed; now the previous versions of only the specified modules are removed.
We introduced a new parameter set that supports the installation of a module from a nuget package. The “-Path” of the package can be from an URL supporting http and https or a local path. For example
The new version of this cmdlets implements the following improvements:
The repository from where the update will be downloaded can now be specified and can be different from the initial installation.
By default, we remove the previous version of a module, you can keep the previous versions by specifying “-KeepPrevious”.
Uninstallation syntax is greatly simplified as we no longer require uninstalling by version. When you have multiple Az versions installed, you are likely going to get an invalid combination of modules if you uninstall a specific version. Because Az is the collection of sub modules, the sub modules always overlap between different Az versions.
We now offer the possibility for you to filter out the modules you want to keep by “-ExcludeModule” or to remove all the preview modules (“-PrereleaseOnly”) when doing the uninstallation.
Due to several factors, including the number of modules we provide, the installation time of the Az modules in automations environments like Azure Functions has becomes a handicap. We put additional efforts in this release to reduce the time it takes to install Az.
Compared to the previous version and other mechanism, the performance of this version of the installer is improved significantly on PowerShell 7.x. In average, if all modules of Az are installed, we see a reduction of about 50% of the installation time.
User Experience Improvement
Based on the feedback we received, in this release, we added a progress bar. We display each execution step and how many modules are installed or uninstalled.
With debug settings, we provide more detailed information.
Getting Started and Next Steps
We hope that Az.Tools.Intaller will improve your experience with managing the Azure PowerShell modules.
Install the installer module with the following commands:
Install-module -Name Az.Tools.Installer
To install Azure PowerShell simply execute:
Please let us know about your experience with the module, ask for feature or report issues you may have on GitHub or on Twitter.