Microsoft Azure PowerShell
Switch branches/tags
v6.13.0-November2018 v6.12.0-November2018 v6.11.0-October2018 v6.10.0-October2018 v6.9.0-September2018 v6.8.1-Auust2018 v6.8.0-August2018 v6.7.0-rc1 v6.7.0-August2018 v6.6.0-July2018 v6.5.0-July2018 v6.4.0-July2018 v6.3.0-June2018 v6.2.1-June2018 v6.2.0-June2018 v6.1.1-May2018 v.6.1.1-AzureRM.Network-May-2018 v6.1.0-May2018 v6.0.1-preview-AzureRM.Automation v6.0.1-May2018 v6.0.0-rc420180530 v6.0.0-rc2 v6.0.0-RC1 v6.0.0-May2018 v5.7.0-April2018 v5.6.0-March2018 v5.5.0-March2018 v5.4.1-February2018 v5.4.0-February2018 v5.3.0February2018rc1final v5.3.0February2018-rc1 v5.3.0-February2018-rtm v5.3.0-February2018-rc2 v5.2.0-January2018 v5.1.1-December2017 v5.1.0-pre v5.0.1-November2017 v5.0.0-preview-AzureRM.Websites v5.0.0-November2017 v4.4.1rc0Oct2017 v4.4.1-October2017 v4.4.0-September2017 v4.4.0-December2017 v4.3.1-AzureRM.Compute-February2018 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.3.0-September2018 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.13.1-nc-July2018 v0.12.0-nc-June2018 v0.11.0-nc-April2018 v0.10.0-nc-February2018 v0.9.8.1-October2015 v0.9.8-September2015
Nothing to show
Clone or download
maddieclayton Merge pull request #7820 from yaakoviyun/preview
Removed storage depedency when inferring storageBlobContainerName
Latest commit a9d0f28 Nov 16, 2018

README.md

Microsoft Azure PowerShell

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

Take a test run now from Azure Cloud Shell!

Modules

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 Standard cmdlets Az Az
Rollup Module for Administrative Modules in Azure Stack AzureStack AzureStack
Rollup Module for Service Management Cmdlets Azure Azure

Installation

For more detailed instructions on installing Azure PowerShell, please refer to the installation guide.

PowerShell Gallery

Run the following command in an elevated PowerShell session to install the rollup module for Azure Resource Manager cmdlets:

Install-Module -Name AzureRM

Run the following command in an elevated PowerShell session to install the new 'Az' module for ResourceManager cmdlets. This module runs on PowerShell 5.1 (with .Net Framework 4.7.2) , or PowerShell Core, and replaces AzureRM. You should not install this module side-by-side with AzureRM:

Install-Module -Name Az

To install the module containing the legacy RDFE cmdlets, run the following command in an elevated PowerShell session:

Install-Module -Name Azure

If you have an earlier version of the Azure PowerShell modules installed from the PowerShell Gallery and would like to update to the latest version, run the following commands in an elevated PowerShell session. Update-Module installs the new version side-by-side with the old version. It does not remove the old version.

# Update to the latest version of AzureRM
Update-Module -Name AzureRM

# Update to the latest version of Az
Update-Module -Name Az

# Update to the latest version of Azure
Update-Module -Name Azure

Web Platform Installer

Download and install the Microsoft Web Platform Installer. Once installed, open the program and search for Microsoft Azure PowerShell. Click the Add button followed by the Install button at the bottom to begin the installation process.

Usage

For more detailed instructions on using Azure PowerShell, please refer to the getting started guide.

Log in to Azure

To connect to Azure, use the Connect-AzureRmAccount cmdlet.

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

# Non-interactive login - you will need to use a service principal
Connect-AzureRmAccount -ServicePrincipal -ApplicationId "http://my-app" -Credential $PSCredential -TenantId $TenantId

To log into a specific cloud (AzureChinaCloud, AzureCloud, AzureGermanCloud, AzureUSGovernment), use the Environment parameter:

# Log into a specific cloud - in this case, the Azure China cloud
Connect-AzureRmAccount -Environment AzureChinaCloud

Getting and setting your session context

To view the context you are using in the current session, which contains the subscription and tenant, use the Get-AzureRmContext cmdlet:

# Get the context you are currently using
Get-AzureRmContext

# List all available contexts in the current session
Get-AzureRmContext -ListAvailable

To get the subscriptions in a tenant, use the Get-AzureRmSubscription cmdlet:

# Get all of the subscriptions in your current tenant
Get-AzureRmSubscription

# Get all of the subscriptions in a specific tenant
Get-AzureRmSubscription -TenantId $TenantId

To change the subscription that you are using for your current context, use the Set-AzureRmContext cmdlet:

# Set the context to a specific subscription
Set-AzureRmContext -Subscription $SubscriptionName -Name "MyContext"

# Set the context using piping
Get-AzureRmSubscription -SubscriptionName $SubscriptionName | Set-AzureRmContext -Name "MyContext"

Discovering cmdlets

Use the Get-Command cmdlet to discover cmdlets within a specific module, or cmdlets that follow a specific search pattern:

# View all cmdlets in the AzureRM.Profile module
Get-Command -Module AzureRM.Profile

# View all cmdlets that contain "VirtualNetwork"
Get-Command -Name "*VirtualNetwork*"

# View all cmdlets that contain "VM" in the AzureRM.Compute module
Get-Command -Module AzureRM.Compute -Name "*VM*"

Cmdlet help and examples

To view the help content for a cmdlet, use the Get-Help cmdlet:

# View the basic help content for Get-AzureRmSubscription
Get-Help -Name Get-AzureRmSubscription

# View the examples for Get-AzureRmSubscription
Get-Help -Name Get-AzureRmSubscription -Examples

# View the full help content for Get-AzureRmSubscription
Get-Help -Name Get-AzureRmSubscription -Full

# View the help content for Get-AzureRmSubscription on https://docs.microsoft.com
Get-Help -Name Get-AzureRmSubscription -Online

Reporting Issues and Feedback

Issues

If you find any bugs when using the Azure PowerShell modules, please file an issue here, making sure to fill out the provided template with the appropriate information.

Alternatively, be sure to check out the Azure Support Community if you have trouble with any of the cmdlets or Azure services.

Feedback

If there is a feature you would like to see in Azure PowerShell, please use the Send-Feedback cmdlet, or file an issue here, to send the team direct feedback.

Contribute Code

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.

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.