Home > Azure > Azure Fixit demo..fix

Azure Fixit demo..fix

2015/05/06

Microsoft has a lot of material for the Azure beginners, for example there is an interesting ebook with a page for the course code.

In the downloadable code there are some PowerShell scripts , that prepares the demo environment (SQL db, web app) in your Azure subscription.

These scripts are in the \fixit\C#\Automation folder.

It must be installed the Azure Powershell extensions, this can be done from the Web Platform installer.

The instructions say that must be launched the New-AzureWebsiteEnv.ps1 , but if you try, does not work.

The code in New-AzureWebsiteEnv.ps1 and New-AzureSql.ps1 must be corrected, where there is the line

Get-AzureSubscription -Current

Must be substituted with

Get-AzureSubscription -Current -ExtendedDetails

It seems that from a certain point in time is necessary to add the ExtendedDetails switch, otherwise you don’t get every needed bit.

But wait, don’t launch the script now.

The Azure PowerShell has a local cache, that could not be correctly initialized.

Then go to C:\Users\[windows user]\AppData\Roaming\Windows Azure Powershell, delete everything.

Launch the PowerShell command line (better if as Administrator, i have done this but i don’t know if really needed)

Write at the prompt Get-AzurePublishSettingsFile and press return.

Immediately appears a Window , with the login request if needed, where is requested to download a file.

Still In the Azure Powershell command write Import-AzurePublishSettingsFile, return: you are prompted for the previously downloaded file.

Notice that in C:\Users\[windows user]\AppData\Roaming\Windows Azure Powershell appears some files.

Now in the Azure PowerShell command you can make a cd (ms-dos Change Directory i mean…), then launch

.\New-AzureWebsiteEnv.ps1

This approach worked for me.

Advertisements
Categories: Azure
%d bloggers like this: