I have powershell scripts which is running locally.But those scripts not running insite function apps > powershell (windows) machine.
az login --service-principal -u $ServicePrincipalId -p
$ServicePrincipalPass --tenant $ServicePrincipalTenant
Getting below when i run the script
ERROR: The term 'az' is not recognized as the name of a cmdlet, function, script file, or operable program.
since i dont have az cli installed in the windows machine, i have added below line to install az command in my script.
Install-Module -Name Az -AllowClobber -Scope CurrentUser
Getting access issue while installing the az.
2019-06-11T12:42:59.698 [Warning] WARNING: InternalWebProxy: Could not find a part of the path 'D:Program Files (x86)SiteExtensionsFunctions2.0.1250732bitworkerspowershell
untimeswin-x86lib
etcoreapp2.1
ef'.
2019-06-11T12:42:59.843 [Warning] WARNING: Win32Helpers: Could not find a part of the path 'D:Program Files (x86)SiteExtensionsFunctions2.0.1250732bitworkerspowershell
untimeswin-x86lib
etcoreapp2.1
ef'.
2019-06-11T12:43:05.023 [Warning] WARNING: User declined to install module (Az).
even -Force is not working. need to know what is causing the issue.
Note :- The script is perfectly running in local windows machine. the issue is when try to run on portal > functionapp> timertrigger
Attaching azure function app creating with windows machine
Getting error after adding cli folder into kudu
> 2019-06-13T12:29:40.510 [Error] ERROR: File
> "C:UsersVSSADM~1AppDataLocalTemppip-install-68v0_w99azure-cli-coreazureclicorecommands\__init__.py", line 523, in execute Microsoft.Azure.WebJobs.Script.Rpc.RpcException :
> Result: ERROR: File
> "C:UsersVSSADM~1AppDataLocalTemppip-install-68v0_w99azure-cli-coreazureclicorecommands\__init__.py", line 523, in execute Exception: File
> "C:UsersVSSADM~1AppDataLocalTemppip-install-68v0_w99azure-cli-coreazureclicorecommands\__init__.py", line 523, in execute
kudu console
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…