Azure CLI: Unable to escape pipe character (|) in Windows PowerShell

Viewed 448

Scenario

I try to create an Azure web app with Azure CLI on my windows machine. Unfortunately, I am not able to choose runtime for my webapp. When I try: az webapp create -n name -g grop -p plan -r "DOTNETCORE|3.1", I am getting an error:

'3.1' is not recognized as an internal or external command,

operable program or batch file.

I was trying to escape pipe with backslash \ but it does not help

2 Answers

You need to enclose within quotes, try this

az webapp create --name somename -g grop  --plan plan  --runtime='"DOTNETCORE|3.1"'

Also replacing pipe | with colon : helps:

az webapp create --name somename -g grop  --plan plan  --runtime="DOTNETCORE:3.1"
Related