简体   繁体   English

如何使用Powershell创建在Linux上运行的Azure Web应用程序?

[英]How do I use Powershell to create an Azure Web App that runs on Linux?

In the Azure Portal I'm able to specify the host operating system when creating a Web App. 在Azure门户中,我可以在创建Web App时指定主机操作系统。 How can I achieve the same via Powershell? 如何通过Powershell实现相同的目标? I' looked into the docs of the New-AzureRmWebApp and New-AzureRmAppServicePlan cmdlets but wasn't able to find any references on how to pass the OS as parameter. 我查看了New-AzureRmWebAppNew-AzureRmAppServicePlan cmdlet的文档,但找不到任何有关如何将OS作为参数传递的引用。 I also tried via the Azure CLI 2.0 on Ubuntu without success. 我也尝试通过Ubuntu上的Azure CLI 2.0失败。

Try the command below, it works fine on my side, it creates a Linux Service Plan and a Linux web app in it. 尝试下面的命令,它对我而言效果很好,可以在其中创建一个Linux服务计划和一个Linux Web应用程序。

New-AzureRmResource -ResourceGroupName <ResourceGroupName> -Location <Location> -ResourceType microsoft.web/serverfarms -ResourceName <YourPlanName> -kind linux -Properties @{reserved="true"} -Sku @{name="S1";tier="Standard"; size="S1"; family="S"; capacity="1"} -Force
New-AzureRmWebApp -ResourceGroupName <ResourceGroupName> -Name <YourAppName> -AppServicePlan <YourPlanName>

在此处输入图片说明

Check it in the Azure Resource Explorer. 在Azure资源浏览器中检查它。

![在此处输入图片描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何为运行2个python脚本的Windows创建Powershell脚本 - How do I create a powershell script for windows that runs 2 python scripts 如何使用Powershell在Azure Web应用程序中创建文件夹并添加文件 - how to create folder and add file in azure web app using powershell 如何使用PowerShell为已停止的Azure Web App禁用Kudu(SCM)? - How do I disable Kudu (SCM) for a stopped Azure Web App using PowerShell? 如何使用Powershell Commandlet在App Service Environment中创建Azure WebApp - How do I create an Azure WebApp in an App Service Environment using the Powershell Commandlets 如何使用 PowerShell(az 模块)部署到 Azure 应用服务? - How do I deploy to Azure App Service with PowerShell (az module)? 如何使用 PowerShell 部署到 Azure 应用服务? - How do I deploy to Azure App Service with PowerShell? 如何在Azure Functions中将GET与PowerShell一起使用? - How do I use GET with PowerShell in Azure Functions? 如何创建在与shell相同的进程中运行的Powershell别名(或函数或cmdlet)? - How do I create a Powershell alias (or function, or cmdlet) that runs in the same process as my shell? 如何通过 PowerShell 或模板将 Azure 混合连接链接到 Azure Web 应用程序? - How can I link an Azure Hybrid Connection to an Azure Web App via PowerShell or a template? 创建一个Azure Web App并使用Powershell部署html文件 - Create an Azure Web App and deploy html file with powershell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM