Question

This question refers to the application slots feature for Azure Server Manager (ASM) WebSites that enables the ability to create a staging website under an existing one. I'd like to swap my site's staging and production environments using Powershell, but I haven't found the way to do it with the currently available commands. Does anyone have an idea how to do it?

Was it helpful?

Solution

Switch-AzureWebsiteSlot -Name "your web site name" -Force

OTHER TIPS

You can use this PowerShell cmdlet: Switch-AzureWebsiteSlot [[-Name] ] [[-Slot1] ] [[-Slot2] ] [-Force] [-Confirm] [-WhatIf] [ ]

[-Force] parameter is used in order to not confirm the swap operation and directly execute

An Example:

C:\PS>Switch-AzureWebsiteSlot -Name YourWebsite
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top