Switch-AzureRmWebAppSlot

Swap two slots with a Web App

Syntax

Switch-AzureRmWebAppSlot
      [-SourceSlotName] <String>
      [[-DestinationSlotName] <String>]
      [[-SwapWithPreviewAction] <SwapWithPreviewAction>]
      [[-PreserveVnet] <Boolean>]
      [-ResourceGroupName] <String>
      [-Name] <String>
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Switch-AzureRmWebAppSlot
      [-SourceSlotName] <String>
      [[-DestinationSlotName] <String>]
      [[-SwapWithPreviewAction] <SwapWithPreviewAction>]
      [[-PreserveVnet] <Boolean>]
      [-WebApp] <Site>
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

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

Examples

Example 1

PS C:\> Switch-AzureRmWebAppSlot -SourceSlotName "sourceslot" -DestinationSlotName "destinationslot" -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp"

This command will switch slot "sourceslot" slot with "destinationslot" for for Web App ContosoWebApp associated with the resource group Default-Web-WestUS

Required Parameters

-Name

WebApp Name

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Resource Group Name

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SourceSlotName

Source Slot Name

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WebApp

WebApp Object

Type:Microsoft.Azure.Management.WebSites.Models.Site
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

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

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DestinationSlotName

Destination Slot Name

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PreserveVnet

Preserve Vnet Boolean

Type:System.Nullable`1[System.Boolean]
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SwapWithPreviewAction

Swap With Preview Action

Type:System.Nullable`1[Microsoft.Azure.Commands.WebApps.Utilities.SwapWithPreviewAction]
Parameter Sets:ApplySlotConfig, CompleteSlotSwap, ResetSlotSwap
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

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

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Site

Parameter 'WebApp' accepts value of type 'Site' from the pipeline