New-AzureRmStorageAccount : The storage account named stor01 is already taken.

What is wrong?

image

It’s not you, it’s Azure. Here is one explained “This is an unfortunate set of errors presented from the Azure side, but they are correct. Storage account names must be unique across all Azure accounts, not just your own, so someone else likely has the name.”

Advertisements

PowerShell for Azure Active Directory (AAD) and Office 365

Well, this is just some notes on how to prepare PowerShell to manage Azure Active Directory and Office 365. But similar to connecting to AD in Azure, you also need to go through these steps to connect PowerShell to an Azure subscription.

This is quite interesting actually when I put them together. As AAD still has two active environment versions, same as Azure console – Classic and RM – they belong to different logins, a little confusing to admins. Also PowerShell modules need to be installed and updated to enable different cmdlets set in order to manage different products – cloud, non-cloud, 3rd-parties like AWS, etc. So when something is not working, maybe you are in a wrong dimension or Microsoft wants you to update the binary you are using.

Azure Subscription AAD Module v1 (MSOnline)
– General Availability version
– Public Preview version
AzureAD v2
– General Availability version
– Public Preview version
Pre-requisites:
– Install lastest Azure Tools using Web Platform Installer
> Add-AzureAccount
> Get-AzurePublishSettingsFile
image
> Import-AzurePublishSettingsFile
> Select-AzureSubscription
Pre-requisites:
MS Online Services Sign-in Assistant
Windows AAD Module for Windows PowerShell
Pre-requisites:
PowerShellGet
image
Step 1: Install Azure PowerShell
Install-Module AzureRM
Download and install Azure AD Connect (.msi)
Update AAD Module > 1.0.8070.2
Download from PS Gallery
Install AAD Module
Update AAD Module
Step 2: Connect to an Azure account
Login-AzureRmAccount
Connect to Azure AD

$Msolcred = Get-credential
Connect-MsolService -Credential $MsolCred

Connect to AAD

$AzureAdCred = Get-Credential
Connect-AzureAD -Credential $AzureAdCred

Step 3: Run Azure PowerShell cmdlets

v1 cmdlets are here v2 are here
More information: PowerShell Gallery Office 365 PowerShell

One more thing: remember to check the update time of anything posted online, those older than 3 months might be useless.

Web Role v.s. Worker Role

Azure Cloud Service Role is classic, old style, one of those you won’t see updated counterpart in new Azure Resource Manager (ARM).  In Azure, a Cloud Service Role is a collection of managed, load-balanced, Platform-as-a-Service (PaaS) virtual machines that work together to perform common tasks. Cloud Service Roles are managed by Azure fabric controller and provide the ultimate combination of scalability, control, and customization.

Web Role and Worker Role are under Cloud services (classic).

cs_diagram

Web Role is a Cloud Service role in Azure that is configured and customized to run web applications developed on programming languages / technologies that are supported by Internet Information Services (IIS), such as ASP.NET, PHP, Windows Communication Foundation and Fast CGI.

Worker Role is any role in Azure that runs applications and services level tasks, which generally do not require IIS. In Worker Roles, IIS is not installed by default. They are mainly used to perform supporting background processes along with Web Roles and do tasks such as automatically compressing uploaded images, run scripts when something changes in database, get new messages from queue and process and more.

Differences between Web and Worker Roles – The main difference between the two is that a Web Role support and runs Internet Information Services (IIS), while an instance of a Worker Role does not.

References:
https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-choose-me
http://cloudmonix.com/blog/what-is-web-and-worker-role-in-microsoft-azure/

CloudAcademy’s Introduction To Microsoft Azure

The 7 section CBT course is just a plain voice reading through the scripts.  I would rather read more up-to-date web pages on microsoft.com.  Compare to other courses in the market, this one has no value, just a waste of time and money.

Windows Azure Overview

  1. Cloud Computing
    Infrastructure/Platform/Software as a Service
    App-Data-Runtime-Middleware-O/S-Virtualization-Servers-Storage-Networking
    … a boring video about Microsoft moduler datacentre contrainer …
  2. Windows Azure Overview
  3. Windows Azure Components
    SQL Databases, Tables, Blobs.
  4. Operational aspects.
    1. Database High Availability and Disaster Recovery
    2. Skillsets required for the operations team
    3. Monitor and diagnostics
  5. Premier Support for Windows Azure
  6. Premier Services

Again, Microsoft Azure charged about $5 a month for an empty database.

Now I realized, I shouldn’t have touched this MS Azure cloud again when I received a newsletter from Windows Azure Team.  All I did one day last month after I saw that email was created an empty web site, a cloud service, an empty database and a storage.  Not a single byte has been put in so far because I still cannot figure out what would the next step be, even to say ‘Hello World”.

image

Last time I wrote about Azure I have the conclusion that a 200MB database in MS cloud could cost user more than $25,000 each month, so this time I haven’t put a single bit in db01 database I just created.

http://woodaway.wordpress.com/2011/02/17/how-much-does-it-cost-to-store-16kb-data-in-azure/

Now it’s happening again, when my credit card expired by the end of June, they sent me two email today (July 1st), reminding me I should update credit card info and also I owe them $0.20 for the first day of July, for nothing.

The Azure billing detail is more sophisticated than the hydro and gas bill:

  1. I don’t know why they charged me 0.016129 ConsumeUnits for an empty database, there is nothing in it, but at least it’s consistent everyday.
  2. The ConsumeUnits of the website are different every day.  Why?  I have nothing, not even one html file in the web site, what has been consumed differently everyday?

image

This is what Azure charged in June for the empty services.

image

image

And this is what MS cloud charged for July 1st, plus tax I assume.

image

This could be the reason – I enabled four services in June 8th although I didn’t have time to touch them again, but the SQL service charged me for an empty database, which might have consumed some kilobytes on their virtual hard disk somewhere in the cloud.

The unreasonable part is the SQL service was not even working when I logged in yesterday.

image

image
I don’t bother call Microsoft support for the error this time.  I called for some other Azure questions last time, it seemed they don’t care.  I am not sure if it’s because I told them I wanted to try (preview) Azure from SMB (small & medium businesses) standpoint or else.  Bottom line, it’s Microsoft product, if Microsoft people don’t care, why should I?

I just deleted everything  under the account, gonna pay a few loonie or toonie to the MS foundation since they claimed I owe them (maybe in fine print somewhere).

Bye Azure!