Create Azure website with Standard pricing tier via Powershell Create Azure website with Standard pricing tier via Powershell powershell powershell

Create Azure website with Standard pricing tier via Powershell


This is possible so easily in the new RM cmdlets. Make sure that you have the latest version of Azure PowerShell first.

First create an App service plan that defines the Standard Price tier, then create a web app with the app service plan.

function Create-AppServicePlan(){    #https://msdn.microsoft.com/en-us/library/mt619306.aspx    $resource = Find-AzureRmResource -ResourceNameContains $ServicePlanName -ResourceGroupNameContains $ResourceGroupName -ResourceType "Microsoft.Web/ServerFarms"    if(!$resource)    {        # Specify the Tier type that you would like        $servicePlan = New-AzureRmAppServicePlan -ResourceGroupName $ResourceGroupName -Name $ServicePlanName -Location $WebAppLocation -Tier Standard -NumberofWorkers 1 -WorkerSize "Small"    }}