[英]Azure Webapp Clone powershell script is not working
I want to copy an existing webapp to another app plan.我想将现有的网络应用程序复制到另一个应用程序计划。 I have collected the command from https://learn.microsoft.com/en-us/azure/app-service/app-service-web-app-cloning
我从https://learn.microsoft.com/en-us/azure/app-service/app-service-web-app-cloning收集了命令
But getting ##[error]Long running operation failed with status 'InternalServerError'.但是得到##[error]长时间运行的操作失败,状态为“InternalServerError”。 error when i am trying to run webapp cloning script.
当我尝试运行 webapp 克隆脚本时出错。
Here is my script,这是我的脚本,
$srcapp = Get-AzWebApp -ResourceGroupName abcd -Name Testapp1
$destapp = New-AzWebApp -ResourceGroupName abcd -Name Testapp2 -Location "West Europe" -AppServicePlan appplan-1 -SourceWebApp $srcapp
Didn't find anything helpful on the web. Can anyone help please?在 web 上找不到任何有用的信息。有人可以帮忙吗?
We have tried the same script that you are using based on the given Microsoft Document
in Question.我们已根据问题中给定的
Microsoft Document
尝试了您正在使用的相同脚本。
The command you are trying,which can create the new app in the West Europe region, and tie it to an existing App Service Plan.您正在尝试的命令可以在西欧地区创建新的应用程序,并将其绑定到现有的应用程序服务计划。
NOTE:- We are using an existing Appservice plan which is P1V2 with West Europe location.注意:- 我们正在使用现有的 Appservice 计划,即 P1V2 和西欧位置。
Same error as you are getting:-与您收到的错误相同:-
Tried to az logout
& az login
again and runned the script worked fine.再次尝试
az logout
& az login
并运行脚本工作正常。
Also make sure that you have provided the App service file path as shown below.To get the path (APP SERVICE PLAN> PROPERTIES>RESOURCEID(COPY&USE)).还要确保您已经提供了如下所示的 App 服务文件路径。获取路径(APP SERVICE PLAN > PROPERTIES > RESOURCEID(COPY&USE))。
$destapp = New-AzWebApp -ResourceGroupName RGNAME -Name appajtest13 -Location "West Europe" -AppServicePlan "subscriptions/subscriptionID/resourcegroups/my resourcegroup/providers/Microsoft.Web/serverFarms/existingappserviceplanname" -SourceWebApp $srcapp
SUCCESFULLY CREATED OUTPUT DETAILS:-成功创建 OUTPUT 详情:-
The PowerShell & az version which we are using as shown below:我们使用的PowerShell&az版本如下图:
For more information you can refer this SO THREAD|Why won't my app service clone properly on Azure as suggested by @ AjayKumar-MSFT .有关详细信息,您可以参考此SO THREAD|为什么我的应用程序服务无法按照 @ AjayKumar-MSFT的建议在 Azure 上正确克隆。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.