![](/img/trans.png)
[英]How to perform deployment swap on an Azure WebSite using Powershell?
[英]Azure Powershell script to swap Azure App Service (website) deployment slots
我正在尋找一種方法來使用Azure PowerShell命令為Azure應用服務(以前的Azure網站)進行部署交換。 我見過的所有帖子都說使用命令
Move-Deployment -ServiceName
但這似乎只適用於雲服務以及生產和分段預定義插槽之間的交換。
我有一個我已定義的部署插槽的網站,我可以使用以下命令獲取有關網站的信息,但我不知道如何交換它:
Get-AzureWebsite -Name "sitenamehere" -Slot test
這可能是你想要的嗎?
Switch-AzureWebsiteSlot [[-Name] <String> ] [[-Slot1] <String> ] [[-Slot2] <String> ] [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]
解決方案是使用該命令
Switch-AzureWebsiteSlot -Name "sitenamehere"
更多詳細信息,請參閱此博客文章http://blogs.msdn.com/b/harikharan/archive/2015/01/01/swap-slots-in-azure-web-site-when-there-are-2-或者更多分段時隙-使用-天青-powershell.aspx
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.