Is there a way to scale an Azure WebSite instance size (not instance count) using PowerShell? I haven\'t found the way.
I know it can be done using
Yes, you first need to know the name of the Resource Group and Web Hosting Plan to which your website belongs, which you can get from the new Azure Portal. Then you can change the worker size to 0 (Small), 1 (Medium) or 2 (Large).
Switch-AzureMode AzureResourceManager
$resourceGroup = "MyResourceGroup"
$webHostingPlan = "MyWebHostingPlan"
$whp = Get-AzureResource `
-Name $webHostingPlan `
-ResourceGroupName $resourceGroup `
-ResourceType "Microsoft.Web/serverFarms" `
-ApiVersion 2014-04-01
$newWorkerSize = 1
$whp.Properties.workerSize = $newWorkerSize
$whp.Properties.workerSizeId = $newWorkerSize
Set-AzureResource `
-Name $webHostingPlan `
-ResourceGroupName $resourceGroup `
-ResourceType "Microsoft.Web/serverFarms" `
-ApiVersion 2014-04-01 `
-PropertyObject $whp.Properties