can't create app service with publish model "container" over Powershell

Florian Bartsch 0 Reputation points
2024-09-27T11:44:57.1533333+00:00

Hey guys,

the last couple days I tried to write a powershell script which creates a azure app service and some deployment slots for it.

First - it seems to work fine but later I realized that the publish model is "always" on "Code" and not "Container".

Is there something wrong with the commands or is it me making a mistake?

I tried the following commands in two differnt ways:

New-AzWebApp -ResourceGroupName "" -Name "" -AppServicePlan "" -Location "" -ContainerImageName ""

az webapp create ``-g "" -p "" -n "" --container-image-name ""

Both methods created the Service but not with publish model "Container".

Second Question:

Is there no way to use powershell commands for configuration like "Disable public access", "Activate network integration", "Disable FTP" and so on?

It looks like there are just limited ways to configure App Services fully over powershell commands, isnt it?

Thanks a lot.

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,489 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,721 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.