Unattended install of a Visual Studio Team Services (a.k.a. VSO) Build Agent

A while ago I was looking at installing the VSTS build Agent on Linux and was searching for the possibility to uninstall it unattended. I was doing this because I wanted to run my agent in a Docker container and on startup I wanted to run a configured agent. I solved ths by using an expect file on Linux. Take a look at my post how I did this.

Back then. There was no possibility for an unattended configuration in Windows as well. But as I was researching some stuff with the windows Build Agent, I found out that now there IS a possibility to configure the BuildAgent in script.

I downloaded the last version of the agent from my Visual Studio Team Services Account.


And then In unpacked the zip to my local disk. In my case to c:\agent\


With a command prompt navigate to this directory and run

.\agent\VsoAgent.exe /? 

And you get a whole list of options


When you run

.\agent\VsoAgent.exe /configure 
/Login:<alternate username>,<alternate password>;AuthType=Basic 


You automatically configure a Build Agent against your VSTS account. Make sure you have set up Alternate credentials that you can use in this command line.


This is perfect when you want to test some builds locally. Create a batch file, run the file and you have a local build agent.


Happy building !

2 Responses to “Unattended install of a Visual Studio Team Services (a.k.a. VSO) Build Agent”

  1. HOW TO for the new vso agent. Team Services or TFS 2017 onprem… They’ve changed to way setup is launched. the config cmd launches bin\Agent.Listener.exe configure %* Looking at Agent.Listener.exe –HELP it shows details about setting up unattended mode installs. Read that for help.


  1. Running a VS Team Services (VSO) Build Agent in a Windows Docker Container | The Road to ALM - February 15, 2016

    […] This run.bat uses the environment variables and call the unattended install of the VSTS build agent as described in my earlier blogpost […]

%d bloggers like this: