Skip to content

Instantly share code, notes, and snippets.

@mikepfeiffer
Last active May 1, 2024 16:56

Revisions

  1. mikepfeiffer renamed this gist Nov 2, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. mikepfeiffer created this gist Nov 2, 2020.
    13 changes: 13 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    # 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