Explore Courses Blog Tutorials Interview Questions
0 votes
in Azure by (45.3k points)

I'm trying to remove a VSTS agent from a system, but I no longer possess the Personal Access Token (PAT) originally used during setup. An answer on this thread states that I can just delete the agent from the VSTS web UI, but I don't see that option besides nuking the entire agent pool (which is not a great option for us).

When I try to run config.cmd remove, these are my results:

PS C:\agent> .\config.cmd remove

Removing agent from the server

Enter authentication type (press enter for PAT) >

Enter personal access token >

Enter personal access token > Exiting...

1 Answer

0 votes
by (16.8k points)

Make sure to remove VSTS agent using config.cmd remove command for which, PAT is required, you don’t need to use original PAT, you can apply a new PAT with Agent Pools (read, manage) scope and use it to remove agent.

In case you try it without the PAT:

Try deleting the agent from the server:

enter image description here

Deleting agent service in local system through sc command if it is running as service: sc delete [service name].

After that, you can delete the agent files.

Related questions

Browse Categories