Monday, May 8, 2017

TFS 2017–How to unconfigure an existing build agent

I couldn’t find good documentation, so here are the steps I used:

  • Browse to the folder where your agent is installed

D:\Builds\Agents\Main1>

  • Execute the /unconfigure command:

D:\Builds\Agents\Main1>agent\vsoagent /unconfigure

Removing EventLog source vsoagent.tfs.Agent-TMD4.

Service vsoagent.tfs.Agent-TMD4 is being removed from the system...

Service vsoagent.tfs.Agent-TMD4 was successfully removed from the system.

Attempt to stop service vsoagent.tfs.Agent-TMD4.

Remark:

First time I tried this, I invoked the command directly from the agent subfolder:

D:\Builds\Agents\Main1\agent>vsoagent /unconfigure

However this failed with the following error message:

You cannot run the vsoAgent.exe interactively from within the Agent folder.

No comments: