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?
Deploy a ZIP package to your web app by using the az webapp deploy command.
Switch-AzureWebsiteSlot -Name "your web site name" -Force
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With