Skip to content

Instantly share code, notes, and snippets.

@mikepfeiffer
Last active May 1, 2024 16:56
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • Save mikepfeiffer/cf79380d5ea8da258370ff0106623653 to your computer and use it in GitHub Desktop.
Save mikepfeiffer/cf79380d5ea8da258370ff0106623653 to your computer and use it in GitHub Desktop.
Create App Service via Azure PowerShell
# Create variables
$webappname = "mywebapp$(Get-Random)"
$rgname = 'webapps3-dev-rg'
$location = 'westus2'
# Create a resource group
New-AzResourceGroup -Name $rgname -Location $location
# Create an App Service plan in S1 tier
New-AzAppServicePlan -Name $webappname -Location $location -ResourceGroupName $rgname -Tier S1
# Create a web app
New-AzWebApp -Name $webappname -Location $location -AppServicePlan $webappname -ResourceGroupName $rgname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment