Azure CLI commands not working inside azure function apps (portal)

前端 未结 1 935
故里飘歌
故里飘歌 2020-12-22 02:07

I have powershell scripts which is running locally.But those scripts not running insite function apps > powershell (windows) machine.

az login --servi

相关标签:
1条回答
  • 2020-12-22 02:22

    As the error shows that you do not install the Azure CLI in the environment. To install the Azure CLI, a possible way is to copy the whole CLI directory that you installed in the local machine to your function KUDU path /home.

    In the test, the copy path in the function KUDU is D:/home/CLI2/.

    Test code:

    D:/home/CLI2/wbin/az.cmd login --service-principal -u 'xxxxxx' -p 'xxxxxx' --tenant 'xxxxxx' | Write-Host
    

    The screenshot of the output:

    0 讨论(0)
提交回复
热议问题