我正在寻找一种方法来使用Azure PowerShell命令为Azure应用服务(以前的Azure网站)进行部署交换 . 我见过的所有帖子都说使用命令
Move-Deployment -ServiceName
但这似乎只适用于 Cloud 服务以及 生产环境 和分段预定义插槽之间的交换 .
我有一个我已定义的部署插槽的网站,我可以使用以下命令获取有关该网站的信息,但我不知道如何交换它:
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-or-more-staging-slots-using-azure-powershell.aspx
2 回答
这可能是你想要的吗?
解决方案是使用该命令
更多详细信息,请参见此博客文章http://blogs.msdn.com/b/harikharan/archive/2015/01/01/swap-slots-in-azure-web-site-when-there-are-2-or-more-staging-slots-using-azure-powershell.aspx