Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

New-AzAppServicePlan

Creates an Azure App Service plan in a given Geo location.

Syntax

S1

New-AzAppServicePlan
 [-Location] <String>
 [[-Tier] <String>]
 [[-NumberofWorkers] <Int32>]
 [[-WorkerSize] <String>]
 [[-AseName] <String>]
 [[-AseResourceGroupName] <String>]
 [[-AseResourceId] <String>]
 [-ResourceGroupName] <String>
 [-Name] <String>
 [-PerSiteScaling <Boolean>]
 [-HyperV]
 [-AsJob]
 [-Tag <Hashtable>]
 [-Linux]
 [-DefaultProfile <IAzureContextContainer>]
 [-AcquirePolicyToken]
 [-ChangeReference <String>]
 [<CommonParameters>]

S2

New-AzAppServicePlan
 [-Location] <String>
 [[-Tier] <String>]
 [[-NumberofWorkers] <Int32>]
 [[-WorkerSize] <String>]
 [[-AseName] <String>]
 [[-AseResourceGroupName] <String>]
 [[-AseResourceId] <String>]
 [-AppServicePlan] <PSAppServicePlan>
 [-PerSiteScaling <Boolean>]
 [-AsJob]
 [-DefaultProfile <IAzureContextContainer>]
 [-AcquirePolicyToken]
 [-ChangeReference <String>]
 [<CommonParameters>]

Description

The New-AzAppServicePlan cmdlet creates an Azure App Service plan in a given Geo location with the specified Tier, worker size, and number of workers.

Examples

Example 1: Create an App Service plan

New-AzAppServicePlan -ResourceGroupName "Default-Web-WestUS" -Name "ContosoASP" -Location "West US" -Tier "Basic" -NumberofWorkers 2 -WorkerSize "Small"

This command creates an App Service plan named ContosoASP in the resource group named Default-Web-WestUS in Geo location West US. The command specifies a Basic Tier and allocates two small workers.

Parameters

-AcquirePolicyToken

Acquire an Azure Policy token automatically for this resource operation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-AppServicePlan

App Service Plan Object

Parameter properties

Type:PSAppServicePlan
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-AseName

App Service Environment Name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-AseResourceGroupName

App Service Environment Resource Group Name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-AseResourceId

Resource id of App Service Environment

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-AsJob

Run cmdlet in the background

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ChangeReference

The change reference resource ID for this resource operation.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

-HyperV

Specify this, App Service Plan will run Windows Containers

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Linux

Specify this, App Service Plan will run Linux Containers

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Location

Location

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Name

App Service Plan Name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-NumberofWorkers

Number Of Workers

Parameter properties

Type:Int32
Default value:1
Supports wildcards:False
DontShow:False

Parameter sets

-PerSiteScaling

Whether or not to enable Per Site Scaling

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ResourceGroupName

Resource Group Name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Tag

Tags are name/value pairs that enable you to categorize resources

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Tier

Tier

Parameter properties

Type:String
Default value:Free
Supports wildcards:False
DontShow:False

Parameter sets

-WorkerSize

Size of web worker

Parameter properties

Type:String
Default value:Small
Accepted values:ExtraSmall, Small, Medium, Large, ExtraLarge, ExtraExtraLarge
Supports wildcards:False
DontShow:False

Parameter sets

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

PSAppServicePlan

Outputs

PSAppServicePlan

Related Links


Feedback

Was this page helpful?