2
votes

I was using vsts private agent vsts-agent-win7-x64-2.123.0.zip with my proj1 on Computer1 with agent name Computer1. After some period of time I removed a whole project from VSTS. Then I was trying to remove agent config like that 'config remove', but had got error

VS800075: The project with id 'd2df8515-d69b-4a5d-96bf-93872a837d25' does not exist, or you do not have permission to access it.

So I decided to setup agent without removing config. ofcause it wasn't succeed. Then I installed new version of vsts private agent 'vsts-agent-win7-x64-2.126.0.zip'. It didn't help. Same errors with configuring and removing. After all of this I comletely delete all files in folder and install new agent. I register new agent with same name to new project proj2. Console output was succeed, service started, everything seemed to be ok. But agent didn't appear in VSTS after 30 minutes. It was strange. I tried to remove agent again, but got this:

Сбой: Удаление агента с сервера
Moved Temporarily

Service has been deleted, but register agent still not available. It tells me to remove agent before. Does anyone know how to delete agent and register it again in such situation?

2

2 Answers

1
votes

In the agent folder, make sure you can see hidden files, delete the .agent and .credentialsfile, then call config remove again. This should remove the service from your local machine and will allow you to reconfigure the agent.

You can also extract the agent to a new folder and perform a clean installation after the service has been de-registered

If the agent is still registered int he agent pool, you can use the little X button to the right of the agent int he Agent Pool screen on VSTS (may need to maximize screen for it to become visible) to remove the agent from VSTS as well. be sure to remove it from the Agent Pool as removing jus from the Agent Queue will not delete the agent from the account completely.

0
votes

If you go to settings of your account --> Agent Pools you can then view the configured agents per pool. Your private agent is probably in the Default pool if you didn't specify a custom pool. Behind the agent name is a X that you can use to remove the agent.

Remove agent from a pool on VSTS

After successfully removing the agent, you can reinstall it on your local machine. Make sure to run your PowerShell window as an Administrator since that's required to configure a Windows Service.