azure - 如何使用Azure Powershell更改Azure WebApp的堆栈?

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

有人知道如何更改 Azure WebApp 的堆栈吗?例如,当使用 New-AzWebApp 创建 Web 应用程序时,默认堆栈是 .NET 4.0。如何将其切换到 DOTNETCORE 而无需恢复使用门户? 另外,如何在创建时指定堆栈而不诉诸资源模板?

最佳答案

据我所知,如果您使用 New-AzWebApp,则无法在创建时指定堆栈,但您可以在创建后使用下面的命令将其切换到 dotnetcore创作。

New-AzWebApp -ResourceGroupName <Resource-Group-Name> -Name <web-app-name> -Location centralus -AppServicePlan <app-service-plan-name>
$PropertiesObject = @{
        "CURRENT_STACK" =  "dotnetcore"
    }
New-AzResource -PropertyObject $PropertiesObject -ResourceGroupName <ResourceGroupName> -ResourceType Microsoft.Web/sites/config -ResourceName "<web-app-name>/metadata" -ApiVersion 2018-02-01 -Force

enter image description here

检查门户:

enter image description here

关于azure - 如何使用Azure Powershell更改Azure WebApp的堆栈?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60908033/

相关文章:

angular - Ionic 3 Web应用程序+ Google Analytics

azure - 获取子网中可用 IP 地址的列表

Azure DevOps 项目 SharePoint 门户 : Document Repository

azure - Azure IoT Hub的多个接收器,如何设置Azure函数的Epoch值?

powershell - 根据 "creationdate"复制文件并创建新文件夹

PowerShell - 删除txt文件中单词之间的空格

powershell - Powershell 中所有进程的 CPU 和内存使用率百分比

powershell - New-AzureRmResourceGroup 命令在 powershell 中不起作用

node.js - 将 Solr 与 Meteor 结合使用

使用 Circleci config.yml 进行 Azure 应用服务插槽和交换部署