Azure / Azure/azure-cli

Webapp:“az webapp create-remote-connection” pauses powershell script

Open
#14,585 3 comments 0 reactions 1 assignee Assigned to @seligj95 View on GitHub
act-observability-squad app-service-networking customer-reported linked needs-team-attention Service Attention Web Apps
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Describe the bug**
When the following line runs in my powershell script, execution of the rest of the script stops
`az webapp create-remote-connection --subscription 00000000-9dfs-4fdsxexxxx-324jklsdf4308320324 --resource-group my-resource-group -n my-app-name -p 12345`

I'm calling it from Windows Task Scheduler, 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
```

Calling the following function to test if the script thinks it should be interactive, it is returning true, indicating it knows it is not interactive
```
function Test-IsNonInteractiveShell {
if ([Environment]::UserInteractive) {
foreach ($arg in [Environment]::GetCommandLineArgs()) {
# Test each Arg for match of abbreviated '-NonInteractive' command.
if ($arg -like '-NonI*') {
return $true
}
}
}
return $false
}
```

**To Reproduce**

**Expected behavior**
That the ssh tunnel will be created and the rest of the script will be executed.

**Environment summary**
Windows 10

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.