メイン コンテンツにスキップ

 Subscribe

Azure PowerShell is a set of PowerShell cmdlets for managing your assets in Azure using Azure Resource Manager (ARM) and Azure Service Management (RDFE). You can install the cmdlets from Microsoft Web Platform Installer, directly from the MSI installer in the Azure PowerShell GitHub repository, or from the PowerShell Gallery. In release 1.3.0, the installation experience from the PowerShell Gallery is significantly improved.

AzureRM – Simpler, faster installation for Azure Resource Manager cmdlets

The AzureRM module collects all the cmdlets necessary to manage your azure assets through Azure Resource Manager (ARM). To download and install all Azure Resource Manager cmdlets, open an elevated  Windows PowerShell or Windows PowerShell Integrated Scripting Environment (ISE) prompt and install the AzureRM Module using the PowerShell Gallery cmdlets.

You no longer need to execute any additional cmdlets to download and install the Azure Resource Manager cmdlets.

First, open an elevated Windows PowerShell or Windows PowerShell Integrated Scripting Environment prompt.

Open Elevated Windows PowerShell Prompt

Then, execute the Install-Module command to download and install all Azure Resource Manager cmdlets.

PS C:> Install-Module AzureRM

If you have not previously set the PSGallery repository as a Trusted repository, you may see a prompt like the following:

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): Y

Type Y and press Enter to download the AzureRM module and all the Azure Resource Manager cmdlets. You can being using the cmdlets immediately:

PS C:> Login-AzureRmAccount

Legacy cmdlet support

The Azure module collects all the cmdlets for managing your legacy Azure assets using the Service Management (RDFE) APIs, just as you can use the Classic Azure Portal to manage those assets interactively. As before, to install all Service Management cmdlets, open an elevated Windows PowerShell or Windows PowerShell Integrated Scripting Environment (ISE) prompt and install the Azure module using the PowerShell Gallery cmdlets.

First, open an elevated Windows PowerShell or Windows PowerShell Integrated Scripting Environment prompt.

Open Elevated Windows PowerShell Prompt

Then, execute the Install-Module command to download and install all Azure Service Management cmdlets.

PS C:> Install-Module Azure

If you have not previously set the PSGallery repository as a Trusted repository, you may see a prompt like the following:

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): Y

Type Y and press Enter to download the AzureRM module and all the Azure Resource Manager cmdlets. You can being using the cmdlets immediately:

PS C:> Add-AzureAccount

Module management changes for PowerShell 3 and PowerShell 4 users

The AzureRM module uses a new module manifest format to specify a version range for each Azure Resource Manager module it references. This change is incompatible with the explicit module management cmdlets for Windows PowerShell 3 and Windows PowerShell 4. This means you cannot explicitly import the AzureRM module in a Windows PowerShell 3 or Windows PowerShell 4 prompt using  Import-Module Azure.

However, since the modules are automatically downloaded into the PSModulePath, you do not need to explicitly import the AzureRM module. You can execute cmdlets immediately after installation.

Note: This change has no impact if you install the Azure Resource Manager cmdlets from Microsoft Web Platform Installer or directly from the MSI installer in the Azure PowerShell GitHub repository.

If you would like to use the Import-Module and Remove-Module cmdlets with the new AzureRM module, you will need to upgrade to Windows Management Framework 5.

  • Explore

     

    Let us know what you think of Azure and what you would like to see in the future.

     

    Provide feedback

  • Build your cloud computing and Azure skills with free courses by Microsoft Learn.

     

    Explore Azure learning


Join the conversation