Skip to main content
Azure
  • 3 min read

Azure PowerShell ‘Az’ Module version 1.0

There is a new Azure PowerShell module, built to harness the power of PowerShell Core and Cloud Shell, and maintain compatibility with Windows PowerShell 5.1. Its name is Az. Az ensures that Windows PowerShell and PowerShell Core users can get the latest Azure tooling in every PowerShell on every platform.

There is a new Azure PowerShell module that is built to harness the power of PowerShell Core and Cloud Shell and maintain compatibility with Windows PowerShell 5.1. Its name is “Az.” Az ensures that Windows PowerShell and PowerShell Core users can get the latest Azure tooling in every PowerShell on every platform. Az also simplifies and normalizes Azure PowerShell cmdlet and module names. Az ships in Azure Cloud Shell and is available from the PowerShell Gallery

The Az module version 1.0 was released on December 18, 2018, and will be updated on a two-week cadence in 2019, starting with a January 15, 2019 release.

As with all Azure PowerShell modules, Az uses semantic versioning and implements a strict breaking change policy – all breaking changes require advance customer notice and can only occur during breaking change releases. 

For complete details on the release, timeline, and compatibility features, check out the Az announcement page.

New features

  • Az runs on Windows PowerShell 5.1 and PowerShell Core (cross-platform)
  • Az is always up to date with the latest tooling for Azure services
  • Az ships in Cloud Shell
  • Az shortens and normalizes cmdlet names – all cmdlets use ‘Az’ as their noun prefix
  • Az simplifies and normalizes module names – data plane and management plane cmdlets for each service use the same Az module
  • Az ships with new cmdlets to enable script compatibility with AzureRM (Enable/Disable-AzureRmAlias)
  • Az enables device code authentication support, allowing login when remoting via a terminal to another computer, VM, or container

You can find complete details on the Az roadmap and features on the Az announcement page.

Migrating from AzureRM

Users are not required to migrate from AzureRM, as AzureRM will continue to be supported. However, it is important to note that all new Azure PowerShell features will appear only in ‘Az’. Az has new features to ease migration, and these are discussed in depth in the Az 1.0 Migration Guide. If you have scripts written for AzureRM, there are three paths for migration

  • Convert existing scripts to Az – For users that mainly use Azure PowerShell interactively and have few scripts, the simplest option is to remove AzureRM when installing Az. You can use the ‘Uninstall-AzureRm’ cmdlet that is included with the Az module to do this. 
  • Keep Az and AzureRM scripts separate and run in separate sessions – Az and AzureRM cannot be executed in the same PowerShell session. However, if you are careful that your scripts use either Az or AzureRM, you can have both modules installed and run scripts using each module in separate sessions. 
  • Install Az in PowerShell Core – since PowerShell Core is installed side-by-side with Windows PowerShell 5.1, you can install Az in PowerShell Core without impacting any existing AzureRM scripts running in Windows PowerShell 5.1. See the Installation Guide for PowerShell Core on Windows for details.

Authentication changes

The Az module is cross-platform, and so some authentication mechanisms supported by Connect-AzureRmAccount have been changed or removed in the Az 1.0 version of the Connect-AzAccount cmdlet, as they are not supported on all platforms. Some of these authentication mechanisms will be enabled in future versions:

  • Support for user login with PSCredential: This capability is currently disabled in Az 1.0, but will be enabled in the January 15, 2019 release for Windows PowerShell 5.1 only. This scenario is discouraged as a mechanism for authenticating scripts, except in limited circumstances. Instead, scripts should use Service Principal authentication as described in “Sign In with Azure PowerShell.”
  • Support for interactive login using the automatic sign-in dialog: In AzureRM, interactive user sign-in automatically displays a web page where the user enters credentials. In Az 1.0, this is replaced with device code authentication, in which the user opens a browser to the device login page and enters a code before providing credentials, as shown in the graphic below.

Device Login

Interactive login with automatic web page login display will be enabled for Windows PowerShell 5.1 only in the January 15, 2019 release and will be supported across all platforms in early 2019.

Azure Automation support

The Az module can run in Windows PowerShell 5.1, but requires .NET Framework version 4.7.2 or later. Azure Automation cloud workers currently support .NET Framework version 4.6.1. Azure Automation is updating their cloud workers to support .NET version 4.7.2, and until these new workers are deployed, Az cannot be used in Azure Automation cloud runbooks. 

The Azure Automation team plans to deploy cloud workers supporting .NET 4.7.2 to all Azure environments and regions by March 15, 2019. You should expect to see more announcements as this rollout progresses in the new year. You can find more information on the Az announcement page.

Try it out

Az, which is open source, shipped version 1.0 on December 18, 2018. You can install Az from the PowerShell Gallery and if you want to go through the code then you can check the Azure PowerShell GitHub repository.

We would like to invite you to install and try the new, cross-platform Az module and we look forward to hearing your questions, comments, or issues with Az either by using the built-in Send-Feedback cmdlet, or via GitHub by submitting an issue.