I installed Azure cli
on a Windows Server Agent
and it works fine in cmd
/PowerShell
. but when I want to use Azure cli
on PowerShell
task in Azure Pipeline
it's not working.
the error message is: 'az' is not recognized as an internal or external command.
cmd
example on agent:
task code sample on Azure Pipeline
:
- powershell: |
echo "*********" | az devops login --organization https://dev.azure.com/*****
displayName: 'Login on Azure CLI
I check Path
environment variable and even update variables in pipeline to ensure everything fine but nothing changes.