Switch-AzureWebsiteSlot -Name "your web site name" -Force
How to perform deployment swap on an Azure WebSite using Powershell?
-
11-10-2022 - |
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?
Solution
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