Installing the Azure PowerShell module from the PowerShell Gallery

  1. Open PowerShell in elevated mode.
  2. To install the Azure PowerShell module for the current portal, run the Install-Module AzureRM cmdlet. If your PowerShell requires the NuGet provider, you will be asked to agree to install it and you will have to agree to the installation policy modification, as the repository is not available on your environment, as shown in the following screenshot:
Figure 1.10: Installing the AzureRM PowerShell module