Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
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)

First, it’s better to remove VSTS agent through config.cmd remove command and the 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.

Secondly, without PAT:

Deleting agent from 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.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...