Add a TFS Online Build Agent

CI/CD: Add a TFS Online Build Agent

  1. Create a new Agent Pool from VSO

    [companyname] -> Settings (Gear Icon) -> Agent Pools -> New Pool

    (The pool name here will be used to be connected by the agent from the TFS Build server)

  2. Generate the Personal Access Token from VSO

    Click your name icon -> Security -> Personal Access tokens -> Add

    (The token generated will be used as the communication token by the agent)

    (refer to

  3. Remote to the TFS Build Server with mPort account

  4. Download the Agent Installation Package according to the TFS Server OS

    The download link can be found from [companyname] -> Settings (Gear Icon) -> Agent Pools -> Download agent

  5. Unzip the installation package to the target folder

  6. Run the command line with Administator
  7. In the command line, navigate to the target folder
  8. Run config.cmd with the following parameters
    • URL: https://[companyname]
    • Personal Access Token: Use the Key from Step 2
    • Pool Name: Use the created pool name in Step 1
    • Agent Name: Can be any
    • Account: mPort Account
    • Run as service: Yes
  9. With above, the new Agent will be found under the new Agent Pool
  10. Update your CI/CD to use the new agent pool


Leave a Reply