Powershell 脚本,"az webapp create-remote-connection"在此指令处暂停



我正试图为托管在azure linux应用程序服务中的docker卷编写备份过程脚本。我需要使用powershell创建一个ssh隧道。使用以下powershell -noninteractive -File R:pathtoftp-backups.ps1从任务调度程序调用脚本

当执行以下命令以创建隧道时

az webapp create-remote-connection --subscription 00000000-9dfs-4fdsxexxxx-324jklsdf4308320324 --resource-group my-resource-group -n my-app-name -p 12345

出现的powershell对话框提供了的交互式选项

Opening tunnel on port: 12345
SSH is available { username: user, password: password }
Ctrl + C to close

脚本不会超过这一点,我如何抑制这个交互式对话框提示,以便脚本的其余部分继续?

我在另一个论坛上回答了你的问题。在此处张贴以查看

工程团队最近对该命令进行了改进,该命令作为CLI 2.8.0版本的一部分进行了部署。PowerShell脚本现在应该可以工作了。

https://github.com/MicrosoftDocs/azure-docs-cli/blob/master/docs-ref-conceptual/release-notes-azure-cli.md#appservice-1