Set-ExecutionPolicy Bypass -Scope Process -Force ::SecurityProtocol = ::SecurityProtocol -bor 3072 iex ((New-Object ).DownloadString('')) #Install Chocolatey so we can simplify the install of some tools and apps for the build agent Adds the path to the Azure CLI to the Path environment variable.Installs the Azure CLI using chocolatey.The way I ended up doing this was to create a powershell script which does the following: I had quite a bit of trial and error here to get it to work but Ill cover what worked first and then some notes on what didnt. There are a couple of different ways you can install the Azure CLI. I get the below error so I know its not and I need to do something: The term 'az' is not recognized as the name of a cmdlet, function, script file, or operable program ![]() I wanted to check if the Azure CLI is actually installed, I can do this with the below command. This task attempts to do a login for the Azure CLI before running your command but then it gets the error that it cant find Azure CLI. I had my pipeline task setup with a service connection but I was getting the below error: Azure CLI 2.x is not installed on this machine The starting point is my build is running and I want to execute an Azure CLI task. I wanted to talk about how we handled this. One of them is getting the Azure CLI task to work. In a previous article I talked about some hoops I needed to jump through when setting up a vm scale set as a self hosted build agent.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |