0

I am using Azure PowerShell and using Azure Resource Manager commandlets to set SKU to "Standard". The following examples isn't working

$azsite = Get-AzureRmResource -ResourceType "Microsoft.Web/Sites" -ResourceName "azwebapp" -ResourceGroupName "DefaultResourceGroupName" 

$azsite.properties.sku = "standard" 

$az | set-azurermresource -Force

The resource still has the free tier.

I also tried.

Set-AzureRmResource -ResourceType "Microsoft.Web/Sites" -ResourceName "azwebapp" -ResourceGroupName "DefaultResourceGroupName" -Sku @{"name" = "standard"} -Force

And still it doesn't change the resource sku to standard.

Mitul
  • 9,734
  • 4
  • 43
  • 60

1 Answers1

1

The best thing is to use the dedicated app service plan cmdlets more over the sku is an app service plan property, you can use the following example

Set-AzureRmAppServicePlan -ResourceGroupName DefaultResourceGroupName -Name <AppServicePlanName> -Tier Standard
Ahmed Elnably
  • 461
  • 3
  • 5
  • So that's exactly what I ended up doing. However, the issue is that in one App Service Plan there are more than one apps and if you switch the Tier then it would end up affecting all the websites. Is there a way to affect tier of just one website? or It is dependent upon the app service plan? – Mitul Apr 16 '16 at 23:50
  • 2
    Generally, you cannot scale individual Wep Apps. You can only scale App Service Plans. However, you can move individual Web Apps to different plans, which achieves what you want. See this question: http://stackoverflow.com/questions/32189610/move-azure-website-between-app-service-plans – David Ebbo Apr 17 '16 at 00:11