简体   繁体   English

Azure Webapp 克隆 powershell 脚本不工作

[英]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.

相关问题 使用 Powershell 脚本生成 Azure Databricks 令牌 - Generate Azure Databricks Token using Powershell script Powershell 脚本 azure function 发布到日志分析 - Powershell script for azure function to post to a log analytics 允许 Azure 服务到 webapp? - Allow Azure services to webapp? 是否可以使用 PowerShell 脚本创建 Azure Databricks 集群? - Is it possible to create Azure Databricks Cluster using PowerShell script? 如何从 Powershell 脚本文件访问 Azure DevOps 预定义变量 - How to access Azure DevOps Predefined variables from Powershell script file Azure Powershell - 从另一个脚本文件加载变量 - Azure Powershell - load variables from another script file Docker 卷行为与 azure webapp - Docker volumes behavior with azure webapp Azure SQL 数据库克隆问题 - Azure SQL database clone problems GitHub Azure Webapp 的操作错误:指定项目或解决方案文件。 当前工作目录不包含项目或解决方案文件 - GitHub Action error for Azure Webapp: Specify a project or solution file. The current working directory does not contain a project or solution file Azure webapp:如何更新Python版本? - Azure webapp: How to update Python version?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM