首页 > 解决方案 > Azure 函数 - PowerShell,安装 az cmdlet :: 术语“az”未被识别为 cmdlet 的名称

问题描述

我正在尝试az为我的 Azure Function 将 cmdlet 安装到 Kudu 上。我目前正在关注本指南:

如何在 Azure 函数中安装 PowerShell 模块

...但是 - 我的 Azure 函数中仍然出现以下错误:

az : The term 'az' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. at run.ps1: line 1

到目前为止我已经完成的步骤:

问题

标签: powershellazureazure-functionsazure-cli

解决方案


我解决了您问题的以下部分

az :术语“az”不被识别为 cmdlet、函数、脚本文件或可运行程序的名称。检查名称的拼写,或者如果包含路径,请验证路径是否正确并重试。在 run.ps1:第 1 行

如果你执行

Test-Path -Path 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin'

你可能会得到 False。这意味着您需要从https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest安装 Azure CLI


推荐阅读