Introducing the new Azure PowerShell Az module
Starting in December 2018, the Azure PowerShell Az module is in general release and now the intended PowerShell module for interacting with Azure. Az offers shorter commands, improved stability, and cross-platform support. Az also offers feature parity and an easy migration path from AzureRM.
With the Az module, Azure PowerShell is now compatible with PowerShell 5.1 on Windows and PowerShell Core 6.x and later on all supported platforms - including Windows, macOS, and Linux.
Az is a new module, so the version has been reset to 1.0.0.
Why a new module?
Major updates can be inconvenient, so it's important that we let you know why the decision was made to introduce a new set of modules, with new cmdlets, for interacting with Azure from PowerShell.
The biggest and most important change is that PowerShell has been a cross-platform product since the introduction of PowerShell Core 6.x, based on the .NET Standard library. We're committed to bringing Azure support to all platforms, which means that the Azure PowerShell modules needed to be updated to use .NET Standard and be compatible with PowerShell Core. Rather than taking the existing AzureRM module and introduce complex changes to add this support, the Az module was created.
Creating a new module also gave our engineers the opportunity to make the design and naming of cmdlets
and modules consistent. All modules now start with the
Az. prefix and cmdlets all use the
AzNoun form. Previously, cmdlet names were not only longer, there were inconsistencies
in cmdlet names.
The number of modules was also reduced: Some modules which worked with the same services have been rolled together, and management plane and data plane cmdlets are now contained all within single modules for their services. For those of you who manually manage dependencies and imports, this makes things much simpler.
By making these important changes that required building a new Azure PowerShell module, the team has committed to making it easier than ever, and on more platforms than previously possible, to use Azure with PowerShell cmdlets.
Upgrade to Az
To keep up with the latest Azure features in PowerShell, you should migrate to the Az module as soon as possible. If you're not ready to install the Az module as a replacement for AzureRM, you have a couple of options available to experiment with Az:
- Use a
PowerShellenvironment with Azure Cloud Shell. Azure Cloud Shell is a browser-based shell environment which comes with the Az module installed and
Enable-AzureRMcompatibility aliases enabled.
- Keep the AzureRM module installed with PowerShell 5.1 for Windows, but install the Az module for PowerShell Core 6.x or later. PowerShell 5.1 for Windows and PowerShell Core use separate collections of modules. Follow the instructions to install PowerShell Core and then install the Az module from a PowerShell Core terminal.
To upgrade from an existing AzureRM install:
- Uninstall the Azure PowerShell AzureRM module
- Install the Azure PowerShell Az module
- OPTIONAL: Enable compatibility mode to add aliases for AzureRM cmdlets with Enable-AzureRMAlias while you become familiar with the new command set. See the next section or Start migration from AzureRM to Az for more details.
Migrate existing scripts to Az
The new cmdlet names have been designed to be easy to learn. Instead of using
in cmdlet names, use
Az. For example, the old command
New-AzureRMVm has become
Migration is more than just becoming familiar with the new cmdlet names, though: There are renamed
modules, parameters, and other important changes.
To help you with the process of migration from AzureRM to Az, we've got a number of resources:
- Get started with migration from AzureRM to Az
- Full list of breaking changes from AzureRM to Az 1.0.0
- The Enable-AzureRmAlias cmdlet
The Az module has a compatibility mode to help you use existing scripts while you update to the new syntax. The Enable-AzureRmAlias cmdlet enables a compatibility mode through aliases, to allow you to use existing scripts with minimal modification while working towards a full migration to Az.
Even though the cmdlet names are aliased, there may still be new (or renamed) parameters or changed return values for the Az cmdlets. Don't expect enabling aliases to take care of the migration for you! See the full breaking changes list to find where your scripts may require updates.
Continued support for AzureRM
The existing AzureRM module will no longer receive new cmdlets or features. However, AzureRM is still officially maintained and will get bug fixes up through at least December 2020.
If you have concerns about whether or not the Az module is as fully-featured, tested, or production ready: All of the engineering work that went into AzureRM has now been focused on Az, including as much code reuse of the existing modules as was possible, and extensive testing to make the new modules feature-compatible. Moving onto Az should be influenced by your organization's schedule alone, without needing to wait on specific features to appear.
Send feedback about: