C# PowerShell Batchfile XSLT JavaScript Ruby
Switch branches/tags
v5.0.1-November2017 v5.0.0-November2017 v4.4.1rc0Oct2017 v4.4.1-October2017 v4.4.0-September2017 v4.4.0-December2017 v4.3.1-August2017 v4.3.0-August2017 v4.2.1-July2017 v4.2.0-July2017 v4.1.0-June2017 v4.0.2-May2017 v4.0.1May2017 v4.0.1-May2017 v4.0.1--May2017 v4.0.0-May2017 v3.8.0-April2017 v3.7.0-March2017 v3.6.0-February2017 v3.5.0-February2017 v3.4.0-January2017 v3.3.0-January2017 v3.3.0-December2016 v3.2.0-November2016 v3.1.0-November2016 v3.0.0-September2016 v3.0.0-September2016-RC2 v3.0.0-September2016-RC1 v2.2.0-September2016 v2.1.0-September2016 v2.0.1-August2016 v2.0.0-August2016 v1.7.0-August2016 v1.6.0-July2016 v1.5.1-June2016 v1.5.0-June2016 v1.4.0-May2016 v1.3.2-April2016 v1.3.0-March2016 v1.2.10-July2017 v1.2.9-March2017 v1.2.8-January2017 v1.2.7-January2017 v1.2.6-September2016 v.1.2.6-AzureRM.Compute v.1.2.3-AzureRM.Compute v1.2.2-March2016 v1.2.1-February2016 v1.2.0-February2016 v1.1.0-January2016 v1.0.2-December2015 v1.0.1-November2015 v1.0.0-preview2-October2015 v1.0.0-preview-gallery-October2015 v1.0.0-November2015 v0.9.8.1-October2015 v0.9.8-September2015 v0.9.7-August2015 v0.9.6-August2015 v0.9.5-July2015 v0.9.1-nc-July2017 v0.8.16-March2015 v0.8.15-March2015 v0.8.14-February2015 v0.8.13-January2015 v0.8.12-December2014 stacksign-20170111.13 stacksign-20161217.12 stacksign-20161217.11 stacksign-20161216.10 stacksign-20161215.8 stacksign-20161215.7 stacksign-20161214.4 stacksign-20160825.3 release-4.0.0 release-4.0.0-RC2 pre-smart-tester clu-2016012142 clu-20160301.85 clu-20160229.84 clu-20160228.83 clu-20160227.82 clu-20160226.81 clu-20160225.80 clu-20160224.79 clu-20160223.78 clu-20160222.77 clu-20160221.76 clu-20160220.75 clu-20160219.74 clu-20160218.73 clu-20160217.72 clu-20160216.71 clu-20160215.70 clu-20160214.69 clu-20160213.68 clu-20160212.67 clu-20160211.66 clu-20160210.65 clu-20160209.64
Nothing to show
Latest commit 0a3403d Nov 22, 2017 @cormacpayne cormacpayne Merge pull request #5019 from Azure/ScottAzure-patch-1
Removed duplicate related link


Microsoft Azure PowerShell

This repository contains a set of PowerShell cmdlets for developers and administrators to develop, deploy and manage Microsoft Azure applications.


Below is a table containing the various Azure PowerShell rollup modules found in this repository. For a full list of modules found in this repository, please see the Azure PowerShell Modules page.

Description Module Name PowerShell Gallery Link
Rollup Module for ARM Cmdlets AzureRM AzureRM
Rollup Module for .NET Core Cmdlets AzureRM.Netcore AzureRM.Netcore
Rollup Module for Administrative Modules in Azure Stack AzureStack AzureStack
Rolledup Module for Service Management Cmdlets Azure Azure


  • Account management

    • Login with Microsoft account, Organizational account, or Service Principal through Microsoft Azure Active Directory
    • Save Credentials to disk with Save-AzureRmContext and load saved credentials using Import-AzureRmContext
  • Environment

    • Get the different out-of-box Microsoft Azure environments
    • Add/Set/Remove customized environments (like your Azure Stack or Windows Azure Pack environments)
  • Management and data plane cmdlets for Azure services in ARM and RDFE

    • Virtual Machine
    • App Service (Websites)
    • SQL Database
    • Storage
    • Backup
    • HDInsight
    • Batch
    • Container Registry
    • StorSimple
    • API Management
    • IoT Hub
    • Content Delivery Network (CDN)
    • Express Route
    • RecoveryServices and SiteRecovery
    • DNS
    • Machine Learning
    • Service Fabric
    • Network
    • Media Services
    • Stream Analytics
    • Event Hubs
    • Data Factory
    • Key Vault
    • Service Bus
    • Scheduler
    • DevTest Labs
    • Notification Hubs
    • Automation
    • Operational Insights
    • Traffic Manager
    • Redis Cache
    • Power BI Embedded
    • Data Lake Store
    • Data Lake Analytics
    • Cognitive Services
    • Logic Apps
    • Analysis Services
  • Windows Azure Pack

    • Web Site: CRUD web site, deployment, configure and get log, start/stop/restart/show web site
    • Service Bus: CRD namespace
    • VM: CRUD VM, get OS disk, size profile and VM template, start/stop/restart/suspend/resume VM
    • VNET: CRUD VNET and subnet.
    • Cloud Service: CRUD cloud service.
  • Windows Azure Stack

    • Azure Stack Administration
    • Storage Service Management

For detail descriptions and examples of the cmdlets, type

  • Get-Help Azure to get all of the Azure PowerShell cmdlets.
  • Get-Help AzureRM to get all of the Azure Resource Manager (ARM) cmdlets.
  • Get-Help <cmdlet name> to get the details of a specific cmdlet.

Supported Environments


PowerShell Gallery

  1. Install Windows Management Framework 5 with PowerShellGet cmdlets for Windows 7 SP1, 8.1, Server 2008 SP1, Server 2012 and Server 2012 R2.
  2. In an elevated PowerShell session, run Install-Module AzureRM
  3. To install legacy RDFE cmdlets, run Install-Module Azure

Microsoft Web Platform Installer

  1. Install Microsoft Web Platform Installer.
  2. Open Microsoft Web Platform Installer and search for Microsoft Azure PowerShell.
  3. Install.

You can also find the standalone installers for all versions of Azure PowerShell in the releases section

Supported PowerShell Versions

Using Azure PowerShell

In general, follow these steps to start using Microsoft Azure PowerShell

  • Get yourself authenticated with Microsoft Azure. For details, please check out this article.
  • Use the cmdlets

The first step can be different for the possible environments you could be targeting. The following are detailed instructions for each supported environment.

Microsoft Azure

If you use both mechanisms on the same subscription, Microsoft Azure Active Directory authentication always wins. If you want to go back to management certificate authentication, please use Remove-AzureAccount, which will remove the Microsoft Azure Active Directory information and bring management certificate authentication back in.

Login directly from PowerShell (Microsoft Azure Active Directory authentication)

# Interactive login - you will get a dialog box asking for your Azure credentials

# Non-interactive login - use service principals
Add-AzureRmAccount -ServicePrincipal -ApplicationId "http://my-app" -Credential $pscredential -TenantId $tenantid

# Use the cmdlets to manage your services/applications
New-AzureRmResourceGroup -Name myresourceGroup -Location "West US"

Microsoft Azure China

Add-AzureRmAccount -EnvironmentName AzureChinaCloud

# Use the cmdlets to manage your services/applications
New-AzureRmResourceGroup -Name myresourceGroup -Location "China East"

Microsoft Azure US Government

Add-AzureRmAccount -EnvironmentName AzureUSGovernment

# Use the cmdlets to manage your services/applications
New-AzureRmResourceGroup -Name myresourceGroup -Location "US Gov Virginia"

Microsoft Azure Germany

Add-AzureRmAccount -EnvironmentName AzureGermanCloud

# Use the cmdlets to manage your services/applications
New-AzureRmResourceGroup -Name myresourceGroup -Location "Germany Central"

Windows Azure Pack

# Add your Windows Azure Pack environment to your Microsoft Azure PowerShell installation.
# You will need to know the following information of your Windows Azure Pack environment.
# 1. URL to download the publish settings file    Mandatory
# 2. Management service endpoint                  Optional
# 3. Management Portal URL                        Optional
# 4. Storage service endpoint                     Optional
Add-WAPackEnvironment -Name "MyWAPackEnv" `
    -PublishSettingsFileUrl "URL to download the publish settings file>" `
    -ServiceEndpoint "<Management service endpoint>" `
    -ManagementPortalUrl "<Storage service endpoint>" `
    -StorageEndpoint "<Management Portal URL>"

# Download a file which contains the publish settings information of your subscription.
# Use the -Environment parameter to target your Windows Azure Pack environment.
# This will open a browser window and ask you to log in to get the file.
Get-WAPackPublishSettingsFile -Environment "MyWAPackEnv"

# Import the file you just downloaded.
# Notice that the file contains credential of your subscription so you don't want to make it public
# (like check in to source control, etc.).
Import-WAPackPublishSettingsFile "<file location>"

# Use the cmdlets to manage your services/applications
New-WAPackWebsite -Name mywebsite

Find Your Way

All the cmdlets can be put into 3 categories:

  1. ARM management cmdlets use the AzureRm prefix (New-AzureRmResourceGroup, Get-AzureRmVM)
  2. Legacy RDFE management cmdlets use the Azure prefix (Get-AzureVM)
  3. Data plane cmdlets that work in ARM or RDFE use the Azure prefix (Get-AzureBlob)

You can use the following cmdlet to find out all the cmdlets for your environment

# Return all the cmdlets for Azure Resource Manager (ARM)
Get-Command *AzureRm*

# Return all the cmdlets for Microsoft Azure
Get-Command *Azure*

# Return all the cmdlets for Windows Azure Pack
Get-Command *WAPack*

If you want to migrate some scripts from Microsoft Azure to Windows Azure Pack or vice versa, as long as the cmdlets you are using are in category 1, you should be able to migrate smoothly.

Need Help?

Be sure to check out the Azure Support Community if you have trouble with the provided code.

Contribute Code or Provide Feedback

If you would like to become an active contributor to this project please follow the instructions provided in Microsoft Azure Projects Contribution Guidelines.

More information about contributing to this repo can be found in CONTRIBUTING md and the Azure PowerShell Developer Guide folder.

If you encounter any bugs with the library please file an issue in the issues section section of the project.

Learn More

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.