Deploying Elastic Agent
Let's download Elastic Agent, apply a Fleet policy, and run it as a service. First, we need to collect the Elastic Agent binary, so from the Windows VM, do the following:
- Download Elastic Agent: https://www.elastic.co/downloads/elastic-agent.
Just like with the Beats, find the elastic-agent-{version}-windows-x86_64.zip file that was downloaded, right-click it, and extract it to the c:\Program Files directory. However, unlike Beats, we'll use an API to authenticate to the Elastic Stack instead of a KeyStore.
Before we install the agent, we need to collect the enrollment token from Kibana. So, browse to Fleet, open your Windows policy, click on Actions, and select Add agent:

Figure 6.14 – The Add agent option in Fleet
Scroll to the bottom on the slide-out window and there will be a copy button for Windows. Select that to copy the installation/enrollment command to your clipboard. Ensure that the --url switch has the...