Step-By-Step: Manage Windows Azure using PowerShell

Hello folks,

Over the last few weeks I’ve been writing about Windows Azure IaaS.

So far, other that the ACL setting post, we’ve been using the portal to get everything done.  I was thinking of how easy it was to automate the ACL settings using PowerShell.  I thought this would make a good few post.

In my Lab environment I have the following setup


I created this lab using Windows Server 2012 R2 evaluation copies.  You can find it here. and here are some free training on Azure.

Anyway, back to Managing Azure using PowerShell.

Install Windows Azure PowerShell

I installed the Windows Azure PowerShell module by running the Microsoft Web Platform Installer  This is the easiest when you have an internet connection.


When prompted, click Run. The Microsoft Web Platform Installer loads, with the Windows Azure PowerShell module available for installation. The Web Platform Installer installs all dependencies for the Windows Azure PowerShell cmdlets.

Connect to your subscription

The PowerShell cmdlets require your subscription information so that it can be used to manage your services. As of the .0.7 release of the module, In order to do that I downloaded the management certificate that contains the information needed to connect PowerShell to my Azure subscription.

The Windows Azure PowerShell module includes cmdlets that help you download and import the certificate.  I started PowerShell from the start Screen


and used the following cmdlet to setup access.

  • The Get-AzurePublishSettingsFile cmdlet opens a web page on the Windows Azure Management Portal, from which you can download the subscription information. The information is contained in a .publishsettings file.


  • Once saved, I used the Import-AzurePublishSettingsFile to imports the .publishsettings file for use by the module. This file includes a management certificate that has security credentials.

Import-AzurePublishSettingsFile “C:\Users\administrator.CONTOSO\Downloads\Windows Azure MSDN - Visual Studio Ultimate-10-29-2013-credentials.publishsettings”


View account and subscription details

You can have multiple accounts and subscriptions available for use by Windows Azure PowerShell. You can add multiple accounts by running Add-AzureAccount more than once. To see the available accounts, type:


And to see subscription information, type:



Update your help files.

I’m always looking for help on the syntax for PowerShell cmdlets. 

so to ensure I have the right files I just ran the following commands


And it updated all the help files.


We’re ready now to look at some scenarios for managing Azure using PowerShell.



Pierre Roman | Technology Evangelist
Twitter | Facebook | LinkedIn

Comments (5)
  1. Awesome Information. Thank you

  2. Sean Kearney says:

    And you forgot the mention the BEST Part.  Once you learn how to do it, You can keep a nice handy little pile of scripts on your USB key to do ALL the work for you (And then get home early but STILL bill for piles of Consulting hours!)




    PowerShell MVP

    (and not allowed anywhere near the Coffee)

  3. Suresh NVH Kotha says:

    Hi Buddy, Good Information for beginners step by step keep post and add my id to get your all updates.

  4. Sunny says:

    Very Helpful post.
    Thank you.

Comments are closed.

Skip to main content