poweshell script to create app service plan for P1mv3

Sowndar kumaresan 26 Reputation points
2023-06-06T08:20:35.57+00:00

Hi team, we are trying to create an Azure app service plan using Power shell script with pricing tier Premium v3 P1mv3, but always creating as Premium P1 and the same issue happens while we creating Premium v3 P0V3

PS script -

New-AzAppServicePlan -Name "app-service-plan-name" -ResourceGroupName "rg-name" -Location "East US" -Tier P1mv3 -WorkerSize Small

Note= We could able to create an app service plan with Premium v3 P1mv3 manually from the Azure portal in the same RG.

Please help on creating an exact script to create Premium v3 P1mv3 and Premium v3 P0V3 using Powershell

Windows for business | Windows Server | User experience | PowerShell
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
{count} votes

2 answers

Sort by: Most helpful
  1. Mario Schützle 4,176 Reputation points
    2023-06-06T11:52:20.4933333+00:00

    Hi Sowndar kumaresan, I want to help you with this question.

    Please verify that the resource group you want to use allow V3 app service deployment. If you have older app service versions already running in the resource group you can't create V3 app services.

    See also: https://learn.microsoft.com/de-de/azure/app-service/app-service-configure-premium-tier#scale-up-from-an-unsupported-resource-group-and-region-combination

    Additionally please use the -Debug parameter in your powershell command to get more info what's going wrong in the deployment.

    Please post the output here (delete secret data before you post it)

    I tried your powershell command and in my environment it works. But it was a newly created resource group with no other app service plans inside.


  2. Grmacjon-MSFT 19,491 Reputation points Moderator
    2023-07-14T00:06:51.64+00:00

    Hi @Sowndar kumaresan , Like PatchFox mentioned in the comments- you want to make sure you're using the right value for Premium v3 P1mv3.

    To create an Azure App Service plan with the Premium v3 P1mv3 pricing tier using PowerShell, you can use the following commands:

    For Premium v3 P1mv3:

    New-AzAppServicePlan -Name "app-service-plan-name" -ResourceGroupName "rg-name" -Location "East US" -Tier PremiumV3 -WorkerSize Small -NumberofWorkers 1 -WorkerTier P1v3
    

    Note that the key difference between the commands is the value of the -WorkerTier parameter, which specifies the worker tier for the App Service plan. For Premium v3 P1mv3, the value is P1v3, ( you dont need the 'M') and for Premium v3 P0V3, the value is P0v3.

    Also, make sure that you have the latest version of the Azure PowerShell module installed, as older versions may not support the Premium v3 pricing tiers.

    Hope that helps.

    -Grace


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.