Change Password For TFS Build Service Account

This post explains how to change service account password for Team Foundation Server Agent Service.

The TFS Agent for 2015 or 2017 versions is a Windows Server machine that hosts the Service that allows running the "Build" and "Release" definitions for your code as part of the DevOps Process. It can run as a Windows Service and can be found by the name VSO Agent in the Services Snap-in. It uses a domain account to run the Windows Service which can be seen under the LogOn properties of the Service.

It runs VSOAgent.exe behind the scenes, which is kept in the Agent folder configured for that TFS Agent.

Example - C:\TFSAgent\agent\Agent\VSOAgent.exe

If at any point, you need to change the Windows Service account details that were configured earlier due to something like a password change, the following command may help you.

Please note that the password should not be changed from the Services Snap-in as it may cause the Agent Service to break.

  1. Open Command Prompt in Administrator mode.
  2. CD to the directory e.g. as mentioned above C:\TFSAgent\agent\. Make sure you're one level above the folder where the VSOAgent.exe is placed, else it'll throw an error.
  3. Run the following command -

    .\Agent\VSOAgent.exe /ChangePassword

  4. Fill in the new credentials as prompted.
  5. Restart the Service VSO Agent from the Services Snap-in.

The Agent should now be running with the new service account.