Azure / Azure/azure-cli

Warn when az container exec with --os-type windows

Open
#20,827 3 comments 0 reactions 0 assignees View on GitHub
act-observability-squad Container Instances customer-reported Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Is your feature request related to a problem? Please describe.**

If I try to run Powershell in a container like this ⬇️ it just exits immediately with no feedback.

```sh
$ az container create --os-type windows --resource-group dev --name win-sandbox --image mcr.microsoft.com/windows/servercore:1809
$ az container exec -g dev --name win-sandbox --exec-command "powershell.exe"
$ # back at prompt immediately with no feedback

```
This is hidden in [the docs](https://docs.microsoft.com/en-us/cli/azure/container?view=azure-cli-latest#az_container_exec) ⬇️, but it took a [StackOverflow question](https://stackoverflow.com/questions/70148536/run-interactive-powershell-in-windows-azure-container-instance/70149465#70149465) to lead me there.
> This command is currently not supported for Windows machines.

**Describe the solution you'd like**

Ideally it would Just Work, but assuming that's not coming soon, then a warning / explanation of what happened would be nice.

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.