Removing and reinstalling agents as Windows™ services
If you installed an agent as a Windows™ service, you can remove and reinstall the service.
Old or non-compact agents
Before you begin, make sure that the agent is installed as a Windows service. See Installing agents from the command line for detailed instructions.
- Open a command prompt as an administrator.
- Go to the C:\agent_install\bin\service folder, where agent_install is the installed agent location.
- Remove the service by running the following command:
Use the name of the service for_agent.cmd remove service_nameservice_name. The default service name isDevOps Deploy Agent. - Reinstall the service by running the following command:
_agent.cmd install service_nameNote: While re-installing an agent, the latest PATH variable values are used.
Compact agents
Before you begin, make sure that the agent is installed as a Windows service. See Installing agents from the command line for detailed instructions.
- Open a command prompt as an administrator.
- Go to the C:\agent_install\bin\ folder, where agent_install is the installed agent location.
- Remove the service by running the following command:
agent.exe uninstall-service - Reinstall the service by running the following command:
agent.exe install-serviceFor additional commands, see Agent executable command-line commands.