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...
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 the pool page in the first time you can't see the "delete" button, but if you press on the right line and dragging him to the right you will see the button.
This repository contains images for the Visual Studio Team Services (VSTS) agent that runs tasks as part of a build or release. VSTS agent images are tagged according to the base OS, an optional Team Foundation Server (TFS) version, and tools that are installed.
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With