Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell 交换机AzureRmWebAppSlot不再支持生产插槽名称_Powershell_Azure_Azure Web App Service - Fatal编程技术网

Powershell 交换机AzureRmWebAppSlot不再支持生产插槽名称

Powershell 交换机AzureRmWebAppSlot不再支持生产插槽名称,powershell,azure,azure-web-app-service,Powershell,Azure,Azure Web App Service,我加上这个是希望它能像我一样节省其他人的浪费时间。我目前无法解释为什么会发生变化,但我可以提供对我有效的解决方案 TL;DR:使用Switch AzureRmWebAppSlot时,不再需要指定生产插槽,只需为-SourceSlot提供要与生产插槽切换的插槽的名称 错误: Switch-AzureRmWebAppSlot -SourceSlotName 'production' -DestinationSlotName 'staging' -ResourceGroupName 'Resource

我加上这个是希望它能像我一样节省其他人的浪费时间。我目前无法解释为什么会发生变化,但我可以提供对我有效的解决方案

TL;DR:使用Switch AzureRmWebAppSlot时,不再需要指定生产插槽,只需为-SourceSlot提供要与生产插槽切换的插槽的名称

错误:

Switch-AzureRmWebAppSlot -SourceSlotName 'production' -DestinationSlotName 'staging' -ResourceGroupName 'ResourceGroup' -Name 'webapp'
Switch-AzureRmWebAppSlot -SourceSlotName 'staging' -ResourceGroupName 'ResourceGroup' -Name 'webapp'
切换AzureRmWebAppSlot:未找到资源组“ResourceGroupName”下的资源“Microsoft.Web/sites/SiteName/slots/production”。 第1行字符:1 +切换AzureRmWebAppSlot-SourceSlotName$SourceSlot-DestinationSlot。。。 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +CategoryInfo:CloseError:(:)[Switch AzureRmWebAppSlot],CloudException
+FullyQualifiedErrorId:Microsoft.Azure.Commands.WebApps.cmdlet.DeploymentSlots.SwitchAzureWebAppSlot旧的工作代码:

Switch-AzureRmWebAppSlot -SourceSlotName 'production' -DestinationSlotName 'staging' -ResourceGroupName 'ResourceGroup' -Name 'webapp'
Switch-AzureRmWebAppSlot -SourceSlotName 'staging' -ResourceGroupName 'ResourceGroup' -Name 'webapp'
新工作代码:

Switch-AzureRmWebAppSlot -SourceSlotName 'production' -DestinationSlotName 'staging' -ResourceGroupName 'ResourceGroup' -Name 'webapp'
Switch-AzureRmWebAppSlot -SourceSlotName 'staging' -ResourceGroupName 'ResourceGroup' -Name 'webapp'