How do I use Powershell to create an Azure Web App that runs on Linux

0 votes
When building a Web App in the Azure Portal, I can define the host OS system. How can I do the same thing with Powershell? I checked through the documentation for the New-AzureRmWebApp and New-AzureRmAppServicePlan cmdlets but couldn't find any mention of passing the OS as a parameter. I also tried using the Azure CLI 2.0 on Ubuntu, but it didn't work.
Mar 16 in Azure by Edureka
• 8,240 points
57 views

1 answer to this question.

0 votes

Try the command below:

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>

enter image description here

Check it in the Azure Resource Explorer.

![enter image description here

answered Mar 25 by Edureka
• 9,540 points

Related Questions In Azure

0 votes
1 answer

How to retrieve View definition on Synapse (Azure SQL DW)?

To authenticate with Azure SQL Database or ...READ MORE

answered Mar 4 in Azure by Edureka
• 8,240 points
86 views
0 votes
1 answer
0 votes
1 answer

Fetch AzureVm name from private IP in powershell

If by a better way you mean ...READ MORE

answered Jul 17, 2018 in DevOps on Cloud by DareDev
• 6,890 points
1,150 views
0 votes
0 answers
0 votes
1 answer

Difference between Azure CLI and PowerShell

The Azure CLI comes with an installer ...READ MORE

answered Mar 25 in Azure by Edureka
• 8,240 points
87 views
0 votes
1 answer
0 votes
1 answer

Failed to Build and deploy JAR app to Azure Web App

You don't need @EnableJpaRepositories because your package ...READ MORE

answered Mar 29 in Azure by Edureka
• 9,540 points
61 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP