Elastic-agent status Error: failed to communicate with Elastic Agent daemon

I have installed Elastic Agent 8.2.2 at my Windows 10 host.
I can see the service running in the Management tools.

But the command to get the status throws an error. PS is running in admin mode.

PS C:\Program Files\Elastic\Agent> .\elastic-agent status
Error: failed to communicate with Elastic Agent daemon: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing open \\\\.\\pipe\\elastic-agent-system: Access is denied."

What can I try to get it working? Thanks.

Hi David,

I have the same problem.
When I changed the user which the elastic agent is running as (which is Local System) to my admin user, I get rid of the problem.
But I would like to know, which privileges the user exactly needs. Can anyone help?

Adrian

I have the same problem for the first ElasticAgent deployment on a Windows 10 client.
Elastic Agent 8.3.2

The issue in only on Windows 10 & Windows 11. No problem on Windows Server 2019, Ubuntu Server 22.04, Ubuntu Desktop 22.04.