Elastic installation broken

Hey there, after trying to install the Elastic agent the Powershell gave me this error:

image

I cas see that the archive had been installed but he cannot communicate with the server.

What can I do do in order to fix it?

Just solved the problem myself, in case that you got this query delete the service from the list with "sc delete ElasticAgent" and install it again.

try adding a -f in the installation command.

If that doesn't work and the previous installation was able to communicate at least once with fleet, you might have "tamper protection" activated. Go to kibana to get an uninstall token.

I tried that but once the service is installed it will block any other tries of installing the service with any token again.