
This Azure tutorial will discuss the quick steps to install Azure PowerShell.
Install Azure PowerShell
If you will think now about what exactly Azure PowerShell is? Azure PowerShell contains modules that provide PowerShell cmdlets to manage the Azure resources and Windows PowerShell. To manage the Azure resources with the cmdlets, there are two ways
Azure PowerShell Module
You can Download the Azure PowerShell module and install the Azure PowerShell module on your local machine, and then you can use different PowerShell cmdlets to manage different Azure resources.
Okay, before installing the Azure PowerShell module, we should discuss the Prerequisites needed.
Prerequisites
- You must have Windows PowerShell version 5.1 or later installed on your machine. One point to note here is if you are using Windows 10, you already have PowerShell 5.1 installed on your machine by default.
- Install the .NET Framework 4.7.2 or later version on your local machine.
- You must install the latest version of PowerShellGet. If you don’t have the latest version of PowerShellGet installed on your machine, then you can use the below PowerShell cmdlet to install the latest version of PowerShellGet.
PS C:\WINDOWS\system32> Install-Module -Name PowerShellGet -ForceInstalling the Azure module in PowerShell
Well, we need to install the az module PowerShell now. We can install the Azure PowerShell module from the PowerShell Gallery, where all the latest Azure PowerShell modules are available.
As part of the Azure PowerShell module installation, you can install the AzureRM or Az module. One very important point to note here is that it is not suggested to install both the AzureRM and Az modules for PowerShell 5.1 on Windows simultaneously.
Az is a replacement for the AzureRM module. Az is always up to date with the latest stuff for Azure services. I feel it’s better to go with the Az module.
Follow the below steps to install the Azure PowerShell module or add the Azure PowerShell module.
1. Open the PowerShell ISE using the Run as Administrator mode.

2. Run the below PowerShell cmdlet to ensure you have the PowerShell Get-Module installed on your local machine.
PS C:\WINDOWS\system32> Get-Module PowerShellGet -list | Select-Object Name,Version,Path
3. Now install the Azure PowerShell Az Module for the current user only using the below PowerShell cmdlet. Ensure you have opened your PowerShell ISE as Run as administrator mode.
if ($PSVersionTable.PSEdition -eq 'Desktop' -and (Get-Module -Name AzureRM -ListAvailable)) {
Write-Warning -Message ('Az module not installed. Having both the AzureRM and ' +
'Az modules installed at the same time is not supported.')
} else {
Install-Module -Name Az -AllowClobber -Scope CurrentUser
}
Now click on the Yes to All button to confirm the installation of the Azure Az module.

4. You can install the Azure PowerShell Az Module for all users’ scope using the below PowerShell cmdlet.
if ($PSVersionTable.PSEdition -eq 'Desktop' -and (Get-Module -Name AzureRM -ListAvailable)) {
Write-Warning -Message ('Az module not installed. Having both the AzureRM and ' +
'Az modules installed at the same time is not supported.')
} else {
Install-Module -Name Az -AllowClobber -Scope AllUsers
}
Click on the Yes to All button to confirm the installation of the Azure Az module for all user’s scope.

Now, once you run the above PowerShell script, it will start installing the Azure Az module, as shown below

To ensure the Azure Az module is installed on your machine, run the below PowerShell cmdlet showing you the modules installed on your machine.
Get-InstalledModule
How to install Azure PowerShell module offline
If, by chance, you cannot connect to the PowerShell Gallery due to Environmental issues or you want to install Azure PowerShell for Windows 7, Windows 8, or Windows 10 machines, then you can also install the Azure PowerShell module offline. But first, you need to find out the Azure PowerShell download options. Follow the below instructions.
But, before the installation, you should know the Prerequisites needed.