Switch-​Azure​Rm​Web​App​Slot

Swap two slots with a Web App

Syntax

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

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: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:SwitchParameter
Aliases:cf
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:Boolean
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SwapWithPreviewAction

Swap With Preview Action

Type:SwapWithPreviewAction
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:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False