0

I can create a container group with:

az container create --os-type windows --resource-group dev --name win-sandbox --image mcr.microsoft.com/windows/servercore:1809

Then running ⬇️ it just exits immediately, but I would like an interactive Powershell prompt.

az container exec -g dev --name win-sandbox --exec-command "powershell.exe" 

This is consistent with omitting -it from a docker run, but there is no such option for az container exec.

How do I get an interactive Powershell prompt?

davetapley
  • 17,000
  • 12
  • 60
  • 86

1 Answers1

1

How do I get an interactive Powershell prompt?

As per the Azure documentation , currently az container exec to open & execute in interactive mode not supported for windows machines.

az container exec Execute a command from within a running container of a container group. The most common use case is to open an interactive bash shell.

VenkateshDodda
  • 4,723
  • 1
  • 3
  • 12
  • How awkward. I've [suggested feedback is added](https://github.com/Azure/azure-cli/issues/20827) to `az container`. – davetapley Dec 24 '21 at 02:16