New-AzureRmWebApp

Creates an Azure Web App.

Syntax

New-AzureRmWebApp
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Location] <String>
   [[-AppServicePlan] <String>]
   [[-SourceWebApp] <Site>]
   [[-TrafficManagerProfileId] <String>]
   [-IgnoreSourceControl]
   [-IgnoreCustomHostNames]
   [[-AppSettingsOverrides] <Hashtable>]
   [[-AseName] <String>]
   [[-AseResourceGroupName] <String>]
   [-IncludeSourceWebAppSlots]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
New-AzureRmWebApp
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Location] <String>
   [[-AppServicePlan] <String>]
   [[-SourceWebApp] <Site>]
   [[-TrafficManagerProfileName] <String>]
   [-IgnoreSourceControl]
   [-IgnoreCustomHostNames]
   [[-AppSettingsOverrides] <Hashtable>]
   [[-AseName] <String>]
   [[-AseResourceGroupName] <String>]
   [-IncludeSourceWebAppSlots]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The New-AzureRmWebApp cmdlet creates an Azure Web App in a given a resource group that uses the specified App Service plan and data center.

Examples

Example 1: Create a Web App

PS C:\>New-AzureRmWebApp -ResourceGroupName Default-Web-WestUS -Name "ContosoSite" -Location "West US" -AppServicePlan "ContosoServicePlan"

This command creates an Azure Web App named ContosoSite in the existing resource group named Default-Web-WestUS in data center West US. The command uses an existing App Service plan named ContosoServicePlan.

Required Parameters

-Location

Location

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

WebApp Name

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

Resource Group Name

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-AppServicePlan

App Service Plan Name

Type:String
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AppSettingsOverrides

App Settings Overrides HashTable

Type:Hashtable
Position:8
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AseName

App Service Environment Name

Type:String
Position:9
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AseResourceGroupName

App Service Environment Resource Group Name

Type:String
Position:9
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IgnoreCustomHostNames

Ignore Custom Host Names Option

Type:System.Management.Automation.SwitchParameter
Position:7
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IgnoreSourceControl

Ignore Source Control Option

Type:System.Management.Automation.SwitchParameter
Position:6
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IncludeSourceWebAppSlots

Include Source WebApp Slots Option

Type:System.Management.Automation.SwitchParameter
Position:10
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SourceWebApp

Source WebApp Object

Type:Microsoft.Azure.Management.WebSites.Models.Site
Position:4
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-TrafficManagerProfileId

Traffic Manager Profile Id

Type:String
Position:5
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TrafficManagerProfileName

Traffic Manager Profile Name

Type:String
Position:5
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Site

Parameter 'SourceWebApp' accepts value of type 'Site' from the pipeline