Skip to content

.Net Diaries

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

  • Home
  • About
  • RSS Feed

Month: August 2013

Credit Status on Windows Azure Management Portal!

This makes me laugh, because a couple of weeks ago a customer asked me if there was a way to understand the money consumption in azure while working from the management portal, and here we are:

Windows Azure Management Portal Credit Status

Author Michael DennyPosted on August 13, 2013August 13, 2013Categories Windows Azure CloudTags consumption, credit status, management portal, windows azure2 Comments on Credit Status on Windows Azure Management Portal!

How To Copy a Blob Across Storage Accounts and Regions

If you ever worked with Windows Azure, you’ve probably stumbled in the bad practice to let the control panel create the storage for you, with an unreadable and forgettable name, and with the worst thing you can do, leaving the storage outside an affinity group, that guarantee low latency between services and storage that should communicate each other.

It is possible with the Windows Azure PowerShell module to copy a storage blob across storage accounts and regions… asynchronously!

For example, you would need to move a virtual machine disk between storage account:

Import-Module Azure
Select-AzureSubscription "My Subscription Name"

$destContext = New-AzureStorageContext –StorageAccountName "MyStorageAccountName" -StorageAccountKey "MyStorageAccountKey"

$blob = Start-AzureStorageBlobCopy -SrcContainer vhds -SrcBlob "xxxx.vhd" -DestContainer vhds -DestBlob "xxxx.vhd" -DestContext $destContext

Then to check the status of the copying, you can execute this command:

$blob | Get-AzureStorageBlobCopyState
Author Michael DennyPosted on August 4, 2013Categories PowerShell, Windows Azure Cloud, Windows Azure TipsTags affinity group, azure, blob, cloud, container, copy blob, powershell, storage, storage account, storage accounts, subscription name, windows azureLeave a comment on How To Copy a Blob Across Storage Accounts and Regions

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

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
Follow .Net Diaries on WordPress.com

Categories

  • Angular (3)
  • CSharp (12)
  • Deployment (4)
  • Electron (1)
  • Entity Framework (3)
  • Funny (1)
  • Git (1)
  • linux (2)
    • raspberry (1)
  • Microsoft MVP (1)
  • Node.js (2)
  • Office (1)
  • Performance (1)
  • PowerShell (8)
  • RabbitMQ (4)
  • Sql Server (5)
  • Team Foundation Server (5)
  • Testing (2)
  • Uncategorized (10)
  • Visual Studio (14)
  • Windows (4)
  • 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 subscribe to this blog and receive notifications of new posts by email.

Join 237 other subscribers

Recent Comments

Michael Denny on Visual Studio: Create self-sig…
didem on Visual Studio: Create self-sig…
Kyla on WPF Design Time Resources…
Michael Denny on Share Wifi Internet with ether…
MachineMaker on Share Wifi Internet with ether…

Archives

  • September 2020 (1)
  • October 2019 (1)
  • September 2019 (1)
  • April 2019 (1)
  • March 2019 (3)
  • 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 feed
  • Comments feed
  • WordPress.com
  • Home
  • About
  • RSS Feed
.Net Diaries Blog at WordPress.com.
  • Follow Following
    • .Net Diaries
    • Already have a WordPress.com account? Log in now.
    • .Net Diaries
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...