Note

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

Access to this page requires authorization. You can try .

New-AzWebAppSlot

Creates an Azure Web App slot.

Syntax

Default (Default)

New-AzWebAppSlot
 [-ResourceGroupName] <String>
 [-Name] <String>
 [[-Slot] <String>]
 [[-AppServicePlan] <String>]
 [[-SourceWebApp] <PSSite>]
 [-IgnoreSourceControl]
 [-IgnoreCustomHostNames]
 [[-AppSettingsOverrides] <Hashtable>]
 [[-AseName] <String>]
 [[-AseResourceGroupName] <String>]
 [-ContainerImageName <String>]
 [-ContainerRegistryUrl <String>]
 [-ContainerRegistryUser <String>]
 [-ContainerRegistryPassword <SecureString>]
 [-EnableContainerContinuousDeployment]
 [-CopyIdentity]
 [-AsJob]
 [-Tag <Hashtable>]
 [-DefaultProfile <IAzureContextContainer>]
 [-AcquirePolicyToken]
 [-ChangeReference <String>]
 [<CommonParameters>]

Description

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

Examples

Example 1

New-AzWebAppSlot -ResourceGroupName Default-Web-WestUS -Name "ContosoSite" -AppServicePlan "ContosoServicePlan" -Slot "Slot001"

This command creates a Slot named Slot001 under an existing Web App names 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.

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 Name or App Service Plan Id. If the Slot and App Service Plan are in different Resource Groups, use the ID instead of the name. The App Service Plan Id can be retrieved using: $asp = Get-AzAppServicePlan -ResourceGroup myRG -Name MyWebapp $asp.id returns the App Service Plan Id.

Parameter properties

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

Parameter sets

-AppSettingsOverrides

App Settings Overrides Hashtable. It works only with SourceWebApp parameter.

Parameter properties

Type:Hashtable
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

-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

-ContainerImageName

Container Image Name and optional tag, for example (image:tag)

Parameter properties

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

Parameter sets

-ContainerRegistryPassword

Private Container Registry Password

Parameter properties

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

Parameter sets

-ContainerRegistryUrl

Private Container Registry Server Url

Parameter properties

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

Parameter sets

-ContainerRegistryUser

Private Container Registry Username

Parameter properties

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

Parameter sets

-CopyIdentity

Copies the managed identity from the parent or source WebApp.

Parameter properties

Type:SwitchParameter
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

-EnableContainerContinuousDeployment

Enables/Disables container continuous deployment webhook

Parameter properties

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

Parameter sets

-IgnoreCustomHostNames

Ignore Custom HostNames Option

Parameter properties

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

Parameter sets

-IgnoreSourceControl

Ignore Source Control Option

Parameter properties

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

Parameter sets

-Name

Webapp Name

Parameter properties

Type:String
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

-Slot

Webapp Slot Name

Parameter properties

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

Parameter sets

-SourceWebApp

Source WebApp Object

Parameter properties

Type:PSSite
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

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

String

PSSite

Outputs

PSSite

Related Links


Feedback

Was this page helpful?