[英]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-AzureRmWebApp和New-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.