Creating an Azure website using  Portal, Powershell and CLI

Creating an Azure website on Microsoft Azure Cloud starts with creating the unique DNS name, specifying the region the website will run in on Microsoft Azure Cloud starts with creating the unique DNS name, specifying the region the website will run in, and adding resources such as a Microsoft Azure SQL Database or Microsoft Azure Storage account. In other words, you are designing the infrastructure for the website that the web application will utlilize. These are the equivalent approach you take in an on-premises environment where you create a website in IIS Manager. When you do this, you simply create the site without any code. Later, application code is published to the site that users can reach through their browser.

A Microsoft Azure website can be created using a variety of tools, such as the following:

  • Microsoft Azure management portal at https://portal.azure.com
  • Azure PowerShell cmdlets
  • Many other UI and command-line tools

Creating an Azure website using the Azure management portal

Using the Azure management portal to create an Azure website provides is an easiest option as it provides a rich and powerful UI experience. You can choose to create your website using a variety of templates. Some templates provide the option to include a database resource such as a SQL Database, MySQL Database, or Azure Storage account. Other templates can be used to create a fully functioning website for popular blogging and content management systems (CMSs), e-commerce, and more. All templates available are in the Web page in the Azure Gallery, as shown in Figure 1.

Creating an azure website 1

FIGURE 1 Web page in the Azure Gallery showing some of the templates available for creating an Azure website

Creating an Azure website using Azure PowerShell

Creating an Azure website using the Azure PowerShell cmdlets requires that you know the location (or region) you want to create the site in and a unique name for the site. To determine
the website locations that are available to your Azure subscription, use the following Azure PowerShell cmdlet.

Get-AzureWebsiteLocation

An Azure PowerShell cmdlet reference is available at https://msdn.microsoft.com/enus/library/azure/jj554330.aspx.

You can also get detailed help on a cmdlet using the PowerShell Get-Help cmdlet.

The result will be a list of locations that are available to your subscription. To determine if an Azure website name already exists, use the following Azure PowerShell command.

Test-AzureName -Website "contoso-web"

The result will be either true or false. If it is true, then the name speciied already exists and therefore cannot be used. If it is false, then the Azure website name does not exist and therefore would be a valid unique name you can use. To create the website, use the New-AzureWebsite cmdlet, specifying the location and name parameters as shown in the following example.

$wsLocation = "West US"
$wsName = "contoso-web"
New-AzureWebsite -Location $wsLocation -Name $wsName

All Azure Websites are created in the Azurewebsites.net domain. If you name your website Contoso-web, it will be reachable using the URL contoso-web.azurewebsites.net

This article is a part of 70-533 Implementing Microsoft Azure Infrastructure Solutions Prep course.

More Articles included in this course are

Creating an Azure website

Creating an Azure website using  Portal, Powershell and CLI Creating an Azure website on Microsoft Azure Cloud starts with creating ...
Read More

Deployment slots in Azure website

Defining deployment slots in Azure website Deployment slots in Azure website are collection of individual Azure website linked to your ...
Read More

Publishing an Azure website

Publishing an Azure website using various methods For publishing an Azure website, the web application or code needs to be ...
Read More

WebJobs in Azure website

Introduction to WebJobs in Azure website and Deployment using Portal and Powershell Web Jobs in Azure websites are exclusive applications ...
Read More

Azure website settings

Introduction to Configuring the azure website settings The first step you will need to follow for an Azure website is to ...
Read More
Loading...

Practice Tests in this course are

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 1

Instructions for Exam 70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 1 This page shows the instructions for Exam 70-533 ...
Read More

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 2

Instructions for Exam 70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 2 This page shows the instructions for Exam 70-533 ...
Read More

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 3

Instructions for Exam 70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 3 This page shows the instructions for Exam 70-533 ...
Read More

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 4

Instructions for Exam 70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 4 This page shows the instructions for Exam 70-533 ...
Read More

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 5

Instructions for Exam 70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 5 This page shows the instructions for Exam 70-533 ...
Read More
Loading...