Hello.
I try to install agent with fleet integration but i don't understand why it doesn't work.
in fleet i have this script:
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri http://srv-ansible:8088/endpoints/asset-directory/content/elastic/beats/elastic-agent/elastic-agent-8.17.0-windows-x86_64.zip -OutFile elastic-agent-8.17.0-windows-x86_64.zip
Expand-Archive .\elastic-agent-8.17.0-windows-x86_64.zip -DestinationPath .
cd elastic-agent-8.17.0-windows-x86_64
.\elastic-agent.exe install --url=https://evo-vs-ef01.eveno.fermetures.fr:8220 --enrollment-token=NFRQckpKQUJZNjFmUDNzOUUzSFY6TFlrUEhRdFdRdDZQY1Fyb0JJT0lRUQ== --force --insecure
but when i run in PS as admin:
[ ] Uninstall failed [0s] Error: unable to find elastic-agent.exe on path: exec: "elastic-agent.exe": cannot run executable found relative to current directory
I have already elastic-agent 8.14.1 on this server... i try to stop service before but same result!
And if i try to uninstall manually :
PS C:\temp\elastic-agent-8.17.0-windows-x86_64> cd 'C:\Program Files\Elastic\Agent\'
PS C:\Program Files\Elastic\Agent> .\elastic-agent.exe uninstall
Elastic Agent will be uninstalled from your system at C:\Program Files\Elastic\Agent. Do you want to continue? [Y/n]:Y
[ ] Failed to uninstall agent [0s] Error uninstalling. Printing logs
Error: error uninstalling agent: uninstall must be run from outside the installed path 'C:\Program Files\Elastic\Agent'
Someone can help me ?