Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Plain Text by tanaka ( 4 years ago )
# Create variables for the repository URL, Web App name and location
$gitrepo="https://github.com/Azure-Samples/app-service-web-dotnet-get-started.git"
$webappname="mywebapp$(Get-Random)"
$resourcegroup="TrainingRG1"
$location="West Europe"
# Create new resource group
New-AzResourceGroup -Name $resourcegroup -Location $location
# Create new App Service plan
New-AzAppServicePlan -Name $webappname -Location $location -ResourceGroupName $resourcegroup -Tier Free
# Create new Web App
New-AzWebApp -Name $webappname -Location $location -AppServicePlan $webappname -ResourceGroupName $resourcegroup
# Create deployment resource manually using ARM
$PropertiesObject = @{
    repoUrl = "$gitrepo";
    branch = "master";
    isManualIntegration = "true";
}
Set-AzResource -PropertyObject $PropertiesObject -ResourceGroupName $resourcegroup `
-ResourceType Microsoft.Web/sites/sourcecontrols -ResourceName $webappname/web `
-ApiVersion 2015-08-01 -Force

 

Revise this Paste

Parent: 104467
Your Name: Code Language: