In this article I’ll guide you How to Install Azure PowerShell Cmdlets and i recommend upgrading PowerShell version 7.X to leverage the new features.
1. To install the PowerShell cmdlets for Azure, you need to download and install the AZ module.
Install-Module -Name Az -AllowClobber -Scope CurrentUser
2. To install it for all the users,
Install-Module -Name Az -AllowClobber -Scope AllUsers
If the AzureRM module is already installed, you first need to uninstall it because both modules AzureRM and AZ cannot reside in the same console and the AzureRm module is going to decommission soon. So anyway we need to upgrade it to the latest AZ Module.
3. To uninstall the AzureRM module use command,
Uninstall-Module AzureRm -Force -Verbose