Blurbs from Burton

DevOp | Tech Lover | Family Man


Azure PowerShell Az (AzureRM replacement) – Installation

AzureRM has been replaced with the new Az module/cmdlets, if you are using PowerShell 5.1 for Windows you would not be able to use both cmdlet versions (Az and AzureRM) if you wish to use bother then upgrade PowerShell Core 6.x or later.

If you have used AzureRM before the cmdlets are very similar when using Az removing the ‘ureRM’ from the previous cmdlets command, this works with most cases, there are a few which don’t.

If you do not have AzureRM installed then run the following in PowerShell

1 # Install-Module -Name Az -AllowClobber -Scope CurrentUser

Confirm the installation has been successful and login to Azure

1 # Connect-AzAccount

There is a migration path that can be performed for AzureRm to Az with the full list of changes listed here –

Migration Steps –

Check that existing scripts work with the latest AzureRM release, the latest release of AzureRm is 6.13.1. If this version is not installed then you might need additional modification to work with the Az module, you can check which version of AzureRM you are running with the following command

1 # Get-InstalledModule -Name AzureRM -AllVersions

When you are ready to install the Az module (detailed above) it is recommended to uninstall the AzureRM module, to do this enter the following

1 # Uninstall-AzureRm

With AzureRM uninstalled and your scripts working with the latest AzureRM version, the next step is to enable the compatibility mode for the Az module, the below command will then allow for old cmdlet names with the Az module installed to be used.

1 # Enable-AzureRmAlias -Scope CurrentUser

Once everything has been tested and migrated to the new Az module and no longer relying on the aliasing behavior, it is then recommended to disable the AzureRMAlias

1 # Disable-AzureRmAlias -Module Az.Accounts -Scope CurrentUser

Once completed you can happily use Az module cmdlet

Leave a Reply

Theme by Anders Norén