Is there a way to upgrade an azure app service plan using powershell?

Viewed 1340

Trying to use the powershell command Set-AzAppServicePlan to upgrade a App Service Plan from Standard S1 plan to a Standard S3 plan. There doesn't seem to be a way to define the "S3".

Set-AzAppServicePlan -Name $appServicePlanName -ResourceGroupName $resourceGroupName -Tier "Standard"  -NumberofWorkers 1 -WorkerSize "Small";

I've tried all manner of different values in the "-Tier" param such as "StandardS3" or "StandardV3" and it always defaults to "Standard S1"

3 Answers

For anyone coming here in utter despair as I did, here is a little more context. I tried to upgrade an AppServicePlan from P1v2 to P2v2. However, this translates to:

Set-AzAppServicePlan -Name $appServicePlanName -ResourceGroupName $resourceGroupName -Tier "PremiumV2" -NumberofWorkers 1 -WorkerSize "Medium"

Note that -Tier points to the Tier familiy and the -WorkerSize points to the size (in the Portal or az cli this is P1, P2, P3 but in AzPowershell this is small/medium/large).

P1v2 = -WorkerSize "Small" and P3v2 = -WorkerSize "Large"

You can't make this stuff up...

I guess you are looking for WorkerSize

Set-AzAppServicePlan -Name $appServicePlanName -ResourceGroupName $resourceGroupName -Tier "Standard"  -NumberofWorkers 1 -WorkerSize "Small"

workerSize options are small, medium, large, extralarge

Set-AzAppServicePlan -Name 'AppServicePlanAuto' -ResourceGroupName 'Medium' -Tier Free -WorkerSize Small
Write-Output $plan.Sku.Size
Related