Azure Web应用程序克隆 powershell 脚本不起作用
我想将现有的WebApp复制到另一个应用程序计划。我已经从,
但获得 ## [错误]长期运行操作失败了'internalServererror' 。
这是我的脚本,
$srcapp = Get-AzWebApp -ResourceGroupName abcd -Name Testapp1
$destapp = New-AzWebApp -ResourceGroupName abcd -Name Testapp2 -Location "West Europe" -AppServicePlan appplan-1 -SourceWebApp $srcapp
在网络上找不到任何有用的东西。有人可以帮忙吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们已根据给定的
Microsoft 文档
有问题。您正在尝试的命令,可以在西欧地区创建新应用程序,并将其与现有的应用程序服务计划绑定。
注意:- 我们正在使用现有的应用程序服务计划是具有西欧位置的 P1V2。
与您收到的错误相同:-
尝试
az 注销
&再次az login
并运行脚本,运行良好。另外,请确保您已提供应用服务文件路径,如下所示。要获取路径(应用程序服务计划>属性>资源ID(复制和使用))。
成功创建输出详细信息:-
src="https://i.sstatic.net/VNU2E.png" alt="在此处输入图像描述" 我们使用的 az 版本如下所示:
有关更多信息,您可以参考此SO THREAD|为什么我的应用程序服务不可用按照 @AjayKumar-MSFT 的建议,在 Azure 上正确克隆。
We have tried the same script that you are using based on the given
Microsoft Document
in Question.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.
Same error as you are getting:-
Tried to
az logout
&az login
again and runned the script worked fine.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)).
SUCCESFULLY CREATED OUTPUT DETAILS:-
The PowerShell & az version which we are using as shown below:
For more information you can refer this SO THREAD|Why won't my app service clone properly on Azure as suggested by @AjayKumar-MSFT.