Skip to content

.Net Diaries

Michael Denny's blog about .NET, Azure and Software Architecture

  • Home
  • About
  • RSS Feed

Tag: cloud storage

Getting Started with Windows Azure PowerShell

To start using Windows Azure PowerShell, you need to run just a couple of commands.

First import the windows azure powershell module:

Import-Module Azure

Retrieve all your subscriptions (certificate method, you should prefer to use the Azure AD method instead, see below):

Get-AzurePublishSettingsFile

A browser window opens at https://windows.azure.com/download/publishprofile.aspx, where you can sign in to Windows Azure and download the publish settings file.

Then import the subscription publish settings file:

Import-AzurePublishSettingsFile C:\MyDownloadedPublishProfile.publishsettings

You should delete the publishing profile that you downloaded after you import those settings. The downloaded profile contains a management certificate that should not be accessed by unauthorized users.

EDIT:

There’s a new way to login azure on powershell, without using the certificate method:

Use the Azure AD method (newest and preferred way)

  1. Open the Azure PowerShell console, as instructed in How to: Install Azure PowerShell.
  2. Type the following command:
    Add-AzureAccount
  3. In the window, type the email address and password associated with your account.
  4. Azure authenticates and saves the credential information, and then closes the window.

Now you can make a lot of operations against the azure fabric (a lot more than you can do from the web portal), like getting the list of containers and the the list of the blobs of a container.

First you select the subscription you want to use:

Select-AzureSubscription -SubscriptionName "My Subscription Name"

Then you set the storage account you want to query on:

Set-AzureSubscription -SubscriptionName "My Subscription Name" -CurrentStorageAccount "mystorageaccount"

(to get the storage account name, you can run Get-AzureStorageAccount)

And now you can get the list of the containers:

Get-AzureStorageContainer

and the list of the blobs of a specified container:

Get-AzureStorageBlob -Container "containername"

Check the complete guide on windows azure online documentation and How to install and configure Azure PowerShell

Advertisements
Author Michael DennyPosted on August 2, 2013September 4, 2014Categories UncategorizedTags azure, cloud, cloud storage, container, powershell, storage, storage account, windows azure2 Comments on Getting Started with Windows Azure PowerShell
Advertisements
Follow .Net Diaries on WordPress.com

Categories

  • Angular (1)
  • CSharp (12)
  • Deployment (4)
  • Electron (1)
  • Entity Framework (3)
  • Funny (1)
  • Git (1)
  • Microsoft MVP (1)
  • Office (1)
  • Performance (1)
  • PowerShell (8)
  • RabbitMQ (2)
  • Sql Server (5)
  • Team Foundation Server (5)
  • Testing (2)
  • Uncategorized (10)
  • Visual Studio (14)
  • Windows (2)
  • Windows Azure Cloud (15)
    • Windows Azure Tips (9)

Social

  • View 0v3rCl0ck’s profile on Facebook
  • View dennymic’s profile on Twitter
  • View micdenny1’s profile on Instagram
  • View dennymic’s profile on LinkedIn
  • View micdenny’s profile on GitHub
  • View UCVoaOHx4xFy3oAe7K_fYjsw’s profile on YouTube

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 228 other followers

Recent Comments

Michael Denny on WPF Design Time Resources…
georgethejournalist on WPF Design Time Resources…
Deepa Ganesh Kumar on Convert XML and JSON to C#…
ggtechcoza on Web Api: enable XML documentat…
Satz on Convert XML and JSON to C#…

Archives

  • April 2018 (1)
  • October 2017 (1)
  • September 2017 (1)
  • February 2017 (6)
  • July 2016 (2)
  • February 2016 (2)
  • January 2016 (1)
  • July 2015 (1)
  • June 2015 (3)
  • May 2015 (1)
  • April 2015 (2)
  • March 2015 (2)
  • February 2015 (1)
  • January 2015 (3)
  • November 2014 (2)
  • October 2014 (2)
  • August 2014 (1)
  • July 2014 (1)
  • June 2014 (7)
  • May 2014 (3)
  • April 2014 (2)
  • March 2014 (5)
  • August 2013 (3)
  • July 2013 (6)
  • June 2013 (2)
  • May 2013 (1)
  • March 2013 (2)

Meta

  • Register
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.com
Advertisements
  • Home
  • About
  • RSS Feed
.Net Diaries Blog at WordPress.com.
Advertisements