How To Install Azure PowerShell Module

In this article, we are going to the see the steps required to install the Azure PowerShell Module on your local machine. Azure PowerShell contains sets of modules that provide multiple cmdlets to manage Azure with Windows PowerShell. You can build automation scripts for Azure resources. There are two different ways to manage Azure resource through cmdlets. They are,

  1. Azure CloudShell - This can be accessed in the browser.
  2. Azure PowerShell - This can be installed on the local computer.

Azure PowerShell contains sets of modules that provide multiple cmdlets to manage Azure with Windows PowerShell. You can build automation scripts with Azure resources.

Click here for detailed information about Azure cloud Shell.

Installing the Azure PowerShell Module

You can install the Azure PowerShell module from PowerShell Gallery. It is the central repository for PowerShell content where you can find the latest PowerShell modules and commands.

Step 1

Open the WindowsPowerShell ISE and run the following command to verify whether the PowerShell Get-Module is available on a local machine. You need to verify because to install any module from PowerShell Gallery, you need the PowerShellGet Module,

Get-Module PowerShellGet -list | Select-Object Name,Version,Path

 

How To Install Azure PowerShell Module

If the PowerShell Get-Module is not installed on your system, click here to install the PowerShellGet Module.

 

Step 2

To install the Azure PowerShell module, run the following command. Make sure that the Windows PowerShell ISE is opened in "run as administrator” mode.

Install-Module AzureRM -AllowClobber

How To Install Azure PowerShell Module

By default, the PowerShell gallery is not configured as a Trusted repository for PowerShellGet. Click on “Yes to All” to continue with the installation.

Step 3

We need to import the AzureRM module to the PowerShell session. By importing this module you can use the AzureRM cmdlets,

Import-Module AzureRM

How To Install Azure PowerShell Module

Step 4

Run the following command to verify whether the AzureRM Module is installed successfully on your local machine,

Get-Module AzureRM -List | Select-Object Name, Version, Path 

How To Install Azure PowerShell Module

Now you can test, deploy, and manage the Azure Resources using AzureRM module cmdlets.

These are the steps to install the Azure PowerShell Module in your local machine. Feel free to fill up the comment box below if you need any assistance.