Edit

Share via


New-AzAppServiceEnvironment

Creates an App Service Environment including the recommended Route Table and Network Security Group

Syntax

ASEv2SubnetNameParameterSet (Default)

New-AzAppServiceEnvironment
    [-ResourceGroupName] <String>
    [-Name] <String>
    [-Location] <String>
    [[-Kind] <String>]
    -VirtualNetworkName <String>
    -SubnetName <String>
    -LoadBalancerMode <String>
    [-SkipRouteTable]
    [-SkipNetworkSecurityGroup]
    [-PassThru]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ASEv3SubnetNameParameterSet

New-AzAppServiceEnvironment
    [-ResourceGroupName] <String>
    [-Name] <String>
    [-Location] <String>
    [[-Kind] <String>]
    -VirtualNetworkName <String>
    -SubnetName <String>
    [-PassThru]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ASEv2SubnetIdParameterSet

New-AzAppServiceEnvironment
    [-ResourceGroupName] <String>
    [-Name] <String>
    [-Location] <String>
    [[-Kind] <String>]
    -SubnetId <String>
    -LoadBalancerMode <String>
    [-SkipRouteTable]
    [-SkipNetworkSecurityGroup]
    [-PassThru]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ASEv3SubnetIdParameterSet

New-AzAppServiceEnvironment
    [-ResourceGroupName] <String>
    [-Name] <String>
    [-Location] <String>
    [[-Kind] <String>]
    -SubnetId <String>
    [-PassThru]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The New-AzAppServiceEnvironment cmdlet creates an App Service Environment.

Examples

Example 1

New-AzAppServiceEnvironment -ResourceGroupName MyResourceGroup -Name MyAseV2 -Location WestEurope -VirtualNetworkName MyVirtualNetwork -SubnetName AseSubnet -LoadBalancerMode Internal

Create App Service Environment named MyAseV2 including recommended Route Table and Network Security Group

Example 2

New-AzAppServiceEnvironment -ResourceGroupName MyResourceGroup -Name MyAseV2 -Location WestEurope -VirtualNetworkName MyVirtualNetwork -SubnetName AseSubnet -LoadBalancerMode Internal -SkipRouteTable -SkipNetworkSecurityGroup

Create App Service Environment named MyAseV2 without recommended Route Table and Network Security Group. These should be create before or right after provisioning the App Service Environment to ensure a functional instance.

Parameters

-AsJob

Run cmdlet in the background and return a Job to track progress.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Kind

The version of the app service environment.

Parameter properties

Type:String
Default value:ASEv2
Accepted values:ASEv2, ASEv3
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:3
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LoadBalancerMode

Load balancer mode of the app service environment.

Parameter properties

Type:String
Default value:None
Accepted values:Internal, External
Supports wildcards:False
DontShow:False

Parameter sets

ASEv2SubnetNameParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ASEv2SubnetIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Location

The Location of the app service environment eg: West Europe.

Parameter properties

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

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

The name of the app service environment.

Parameter properties

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

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

Return the app service environment object.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The name of the resource group.

Parameter properties

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

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SkipNetworkSecurityGroup

Do not create the recommended network security group as part of the app service environment.

Parameter properties

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

Parameter sets

ASEv2SubnetNameParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ASEv2SubnetIdParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SkipRouteTable

Do not create the recommended route table as part of the app service environment.

Parameter properties

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

Parameter sets

ASEv2SubnetNameParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ASEv2SubnetIdParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SubnetId

The subnet id.

Parameter properties

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

Parameter sets

ASEv2SubnetIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ASEv3SubnetIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SubnetName

The subnet name. Used in combination with -VirtualNetworkName and must be in same resource group as ASE. If not, use -SubnetId

Parameter properties

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

Parameter sets

ASEv2SubnetNameParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ASEv3SubnetNameParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VirtualNetworkName

The vNet name. Used in combination with -SubnetName and must be in same resource group as ASE. If not, use -SubnetId

Parameter properties

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

Parameter sets

ASEv2SubnetNameParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ASEv3SubnetNameParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

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

None

Outputs

Object