【问题标题】:Azure CLI: Unable to escape pipe character (|) in Windows PowerShellAzure CLI:无法在 Windows PowerShell 中转义管道字符 (|)
【发布时间】:2021-03-17 14:12:46
【问题描述】:

场景

我尝试在我的 Windows 机器上使用 Azure CLI 创建一个 Azure Web 应用程序。不幸的是,我无法为我的 webapp 选择运行时。当我尝试:az webapp create -n name -g grop -p plan -r "DOTNETCORE|3.1" 时,出现错误:

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

可运行的程序或批处理文件。

我试图用反斜杠 \ 转义管道,但它没有帮助

【问题讨论】:

    标签: azure powershell azure-cli


    【解决方案1】:

    你需要用引号括起来,试试这个

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

    【讨论】:

      【解决方案2】:

      还用冒号: 替换管道| 有帮助:

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2013-03-21
        • 1970-01-01
        • 1970-01-01
        • 2023-01-11
        • 2016-07-24
        • 2014-07-09
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多