“az webapp create-remote-connection” pauses script

Steven H 1 Reputation point
2020-07-29T21:26:44.107+00:00

I'm attempting to script a backup process of a docker volume hosted in a azure linux app service, I need to create a ssh tunnel using powershell.
Calling the script from task scheduler with the following :

powershell -noninteractive -File R:\path\to\ftp-backups.ps1

When the following command is executed to create the tunnel

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

A powershell dialog pops up indicating progress, and then pauses the script with the feedback below and offering the interactive options to close

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

The script does not move past this point, how can I suppress this interactive dialog prompt so the rest of the script will continue?

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,322 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,690 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 15,156 Reputation points
    2020-08-06T00:28:01.947+00:00

    Hi @Steven H ,

    Thanks for your patience. The engineering team has revamped this command recently which was deployed as part of CLI release 2.8.0

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

    Can you please try the newer version of CLI & let us know if you still see a similar experience?

    Thanks,

    Grace