New-AzureRmAppServicePlan
Creates an Azure App Service plan in a given Geo location.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
New-AzureRmAppServicePlan
[-Location] <String>
[[-Tier] <String>]
[[-NumberofWorkers] <Int32>]
[[-WorkerSize] <String>]
[[-AseName] <String>]
[[-AseResourceGroupName] <String>]
[-PerSiteScaling <Boolean>]
[-HyperV]
[-AsJob]
[-ResourceGroupName] <String>
[-Name] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
New-AzureRmAppServicePlan
[-Location] <String>
[[-Tier] <String>]
[[-NumberofWorkers] <Int32>]
[[-WorkerSize] <String>]
[[-AseName] <String>]
[[-AseResourceGroupName] <String>]
[-PerSiteScaling <Boolean>]
[-AsJob]
[-AppServicePlan] <PSAppServicePlan>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The New-AzureRmAppServicePlan 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
PS C:\>New-AzureRmAppServicePlan -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
-AppServicePlan
App Service Plan Object
Type: | PSAppServicePlan |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AseName
App Service Environment Name
Type: | String |
Position: | 6 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AseResourceGroupName
App Service Environment Resource Group Name
Type: | String |
Position: | 7 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AsJob
Run cmdlet in the background
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HyperV
Specify this, App Service Plan will run Windows Containers
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Location
Location
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
App Service Plan Name
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NumberofWorkers
Number Of Workers
Type: | Int32 |
Position: | 4 |
Default value: | 1 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PerSiteScaling
Whether or not to enable Per Site Scaling
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Resource Group Name
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Tier
Tier
Type: | String |
Position: | 3 |
Default value: | Free |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WorkerSize
Size of web worker
Type: | String |
Accepted values: | Small, Medium, Large, ExtraLarge |
Position: | 5 |
Default value: | Small |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Parameters: AppServicePlan (ByValue)