azure - 用于为 P1mv3 创建应用程序服务计划的 powershell 脚本是什么

标签 azure azure-web-app-service azure-powershell

我们正在尝试使用定价层为 Premium p1mV3 的 Power shell 脚本创建 Azure 应用服务计划,但始终创建​​为 Premium P1,并且在创建 Premium P0V3 时会发生相同的问题

PS 脚本 -

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

注意=我们可以从新 RG 中的 Azure 门户手动创建具有 Premium v​​3 P1mv3 的应用服务计划。

请帮助创建一个精确的脚本,以使用 Powershell 创建 Premium P1mv3 和 Premium P0V3

实际结果:actual.img

预期结果:预期1.img,预期2.img[预期1][实际]expected2 ]( /image/i5hFi.png )]( /image/cxFDo.png )

尚未按照上面描述中提到的预期创建

最佳答案

这是使用 powershell 命令识别出的 p1mv3 定价计划的问题,如本 Microsoft Q&A 中所确认的那样。 。替代方法是使用 Az CLIRestAPI .

使用 az appservice plan create CLI 命令:-

az appservice plan create --resource-group <resourcegroupname> --name newcliplan --sku P1mV3

注意:您还可以使用不同的 sku 选项创建应用服务计划。对于 P0V3,它看起来像--sku P0V3

enter image description here

enter image description here

New-AzAppServicePlan PowerShell 命令:-

我能够使用 PowerShell 设置其他 sku 层选项(例如:P1V3)。>

New-AzAppServicePlan -ResourceGroupName <ResourceGroup> -Name <planname> -Location westus -Tier "PremiumV3"

enter image description here

enter image description here

关于azure - 用于为 P1mv3 创建应用程序服务计划的 powershell 脚本是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76652707/

相关文章:

powershell - 如何通过 azure devops 发布管道中的 powershell 任务创建 azure 资源?

azure - 如何隐藏 Select-AzureRmSubscription 的控制台输出

sql-server - Azure 入站安全规则不适用于修复源端口

Azure 应用服务 API CORS 策略不起作用

node.js - Package.json 指定了 Node 版本,但 Azure 告诉我没有指定

powershell - 使用 ARM 或 PowerShell 在 AppService 中启用 .NET Core 集合

powershell - 如何使用 PowerShell 比较两个 CSV 文件

azure - Azure 负载均衡器和应用程序网关上的负载均衡有何不同?

Azure Devops 无法连接到 Service Fabric 群集

azure - 通过 Powershell 或 API 扩展 Azure 服务总线