YannickRe / azuredevops-buildagents

Generate self-hosted build agents for Azure DevOps, just like Microsoft does.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cleanup.ps1

rajeevoncloud9 opened this issue · comments

cleanup.ps1 : 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 C:\a_temp\a0ea801e-2bd1-4e92-8d32-45fbc2fd26d4.ps1:4 char:1

  • . 'C:\a\3\s\azuredevops-buildagents\scripts\cleanup.ps1' -ResourcesNa ...
  •   + CategoryInfo          : ObjectNotFound: (az:String) [cleanup.ps1], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException,cleanup.ps1
    

You'll have to provide a bit more context, I have no clue what is going on. Help me to help you ;)

Defenitely, while runnong cleanup.ps1 script as part of Clean up resources task.
I am getting above error in my pipeline

Which Build Agent are you using to run the pipeline? It looks like you don't have the Azure CLI installed in there...

I am using plane windows agent, do I need to install AZ CLI? or do i need to install other utilities as well?

can we connect sometime, my deadline is reaching?

If you are using the Microsoft Hosted agent, Windows 2019 or 2022, it'll have Azure CLI installed. If you use your custom build agent image, it will need to have Azure CLI installed (and some other things).
What's the pipeline YAML you are using? Can you give more screenshots, information?

I cannot connect with you over an as-is provided opensource solution, I'm sorry. If you need more dedicated help, I can offer consulting services for a fee.

As per my understanding, the agent I am using is from vmss where ultimately this script would update the generated image.