With the switch of VSTS to Azure DevOps it seems the ability to delete an Agent from a pool from within the portal is gone. When a server hosting an agent needs to be rebuilt, we have always gone into the portal and deleted the server from the pool before rebuilding so that the server would seamlessly get added back to the pool. Otherwise, the installation fails saying that there is already a server with that name in the pool.
Does anyone know how to delete an existing agent from a pool in Azure DevOps, either manually or programmatically? Would love to be able to add a check for the name into the agent install script along with a delete if the name exists.