Azure PowerShell Module Installation

Introduction

Azure Cloud Shell and Azure PowerShell are the two different types of shells available to manage the Azure resources through cmdlets. Azure Cloud Shell can be accessed through the browser and the Azure PowerShell is to be installed on the computer.

Azure PowerShell module helps to manage the Azure resources through simple commands in fractions of seconds. Azure PowerShell module provides the set of cmdlets which helps to manage the Azure resources through Windows PowerShell.

Click here for detailed information on Azure Cloud Shell

Below are the steps to install Azure PowerShell on the local machine,

Installation of Azure PowerShell Module

The below steps explains about installing the Azure PowerShell module from the PowerShell Gallery.

Step1

To install any module from the PowerShell Gallery requires the PowerShellGet module. Run the following command to verify whether the PowerShellGet module is available on local machine.

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

Azure

The execution of the command should give the output similar to the above image.

To Install PowerShellGet Module, follow the steps mentioned here

Step 2

Installing Azure PowerShell module needs administrator privileges. Hence open the Windows PowerShell as an administrator and run the following command to install the Azure PowerShell module.

Install-Module AzureRM -AllowClobber

AllowClobber

This parameter eliminates the error message due to the command name conflict with the existing PS Module.

By default, the PowerShell gallery is not configured as a Trusted repository for PowerShellGet. The first time you use the PSGallery you see the following prompt,

Azure

Answer ‘Yes’ or ‘Yes to All’ to continue the installation

Azure

Azure

Typically the AzureRM PS module installation would take 10-15Mins depends on the network connectivity.

Step3

Once the AzureRM PS module installation is done successfully, we would need to import the module to the PowerShell session. Importing the PS module can be done through the non-elevated access powershell session.

Import-Module AzureRM

Azure

Step 4

To verify whether the Azure PowerShell Module is imported successfully, run the following command

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

Azure

Conclusion

The above steps help to install the Azure PowerShell Module on the local machine. Hope this article helps to have clear installation of Azure PowerShell Module.