Note

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

Access to this page requires authorization. You can try .

Switch-AzWebAppSlot

Swap two slots within a Web App

Syntax

S1

Switch-AzWebAppSlot
 [-SourceSlotName] <String>
 [[-DestinationSlotName] <String>]
 [[-SwapWithPreviewAction] <SwapWithPreviewAction>]
 [[-PreserveVnet] <Boolean>]
 [-ResourceGroupName] <String>
 [-Name] <String>
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [-AcquirePolicyToken]
 [-ChangeReference <String>]
 [<CommonParameters>]

S2

Switch-AzWebAppSlot
 [-SourceSlotName] <String>
 [[-DestinationSlotName] <String>]
 [[-SwapWithPreviewAction] <SwapWithPreviewAction>]
 [[-PreserveVnet] <Boolean>]
 [-WebApp] <PSSite>
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [-AcquirePolicyToken]
 [-ChangeReference <String>]
 [<CommonParameters>]

Description

The Switch-AzWebAppSlot cmdlet switches two slots associated with an Azure Web App.

Examples

Example 1

Switch-AzWebAppSlot -SourceSlotName "sourceslot" -DestinationSlotName "destinationslot" -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp"

This command will switch slot "sourceslot" with slot "destinationslot" on the Web App ContosoWebApp in the resource group Default-Web-WestUS.

Note

Use "production" as the slot name when the either the source or destination slot is intended to be the production slot.

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

-ChangeReference

The change reference resource ID for this resource operation.

Parameter properties

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

Parameter sets

-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

-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

-DestinationSlotName

Destination Slot Name

Parameter properties

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

-PreserveVnet

Preserve Vnet Boolean

Parameter properties

Type:

Nullable<T>[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

-SourceSlotName

Source Slot Name

Parameter properties

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

Parameter sets

-SwapWithPreviewAction

Swap With Preview Action

Parameter properties

Type:

Nullable<T>[SwapWithPreviewAction]

Default value:None
Accepted values:ApplySlotConfig, CompleteSlotSwap, ResetSlotSwap
Supports wildcards:False
DontShow:False

Parameter sets

-WebApp

WebApp Object

Parameter properties

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

Parameter sets

-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

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

Void


Feedback

Was this page helpful?