# Beat agents installation on multiple servers / hosts

**URL:** <https://discuss.elastic.co/t/beat-agents-installation-on-multiple-servers-hosts/124847>\
**Category:** Beats\
**Created:** [March 20, 2018, 7:25pm UTC](https://discuss.elastic.co/t/beat-agents-installation-on-multiple-servers-hosts/124847 "2018-03-20T19:25:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![codeguru](https://avatars.discourse-cdn.com/v4/letter/c/45deac/32.png) [@codeguru](https://discuss.elastic.co/u/codeguru)\
**Post date:** [March 20, 2018, 7:25pm UTC](https://discuss.elastic.co/t/beat-agents-installation-on-multiple-servers-hosts/124847/1 "2018-03-20T19:25:48Z")

</div>

I have installed beat agents on single machine and I want to get them installed (winlogbeat, metricbeat and filebeat) on 5 more machines in my environment. I don't want to login to each and every machine and install them. I want to run a powershell script or single step installation method to acheive this.  
Has anyone ran into these issues? or accomplished it? Please help me out! thanks

---

<div class="post-metadata">

**Author:** ![Faktu4noCaM](https://avatars.discourse-cdn.com/v4/letter/f/71c47a/32.png) [@Faktu4noCaM](https://discuss.elastic.co/u/Faktu4noCaM)\
**Post date:** [March 22, 2018, 2:10pm UTC](https://discuss.elastic.co/t/beat-agents-installation-on-multiple-servers-hosts/124847/2 "2018-03-22T14:10:58Z")

</div>

If you have Active Directory, you can use Group Policy to install MSI package with beats, but the difficult is to prepare such MSI package. For creating MSI package i`ve used SharpDevelop IDE with WiX for building installers.

If you want to use batch scripts, u can use it like this:

1. variant - Run script on targer machine

> **Code and comments**
>
> mkdir "C:\ProgramData\beats\Winlogbeat" - create folder, where u want to copy beat
> 
> copy "\path\_to\_shared\_folder\_with\_all\_nessesary\_files\Winlogbeat\*.\*" "C:\ProgramData\beats\Winlogbeat" /y - copy files from network shared folder to target folder
> 
> sc create Winlogbeat binPath= ""C:\ProgramData\beats\winlogbeat\winlogbeat.exe" -c "C:\ProgramData\beats\winlogbeat\winlogbeat.yml" -path.home "C:\ProgramData\beats\winlogbeat" -path.data "C:\ProgramData\winlogbeat"" DisplayName= "Winlogbeat" type= own start= auto - this create winservice and set path to config and other params
> 
> sc start winlogbeat - start service
> 
> For other beats it will be the same.

1. Variant - create service on a target machine from remote PC.  
If your account sets as a local administrator on all machines, you need 2 things:

1. copy in some way files to target pc (use admin resources \pc\_name\c$\C:\ProgramData\beats\winlogbeat or other way)
2. run cmd and use SC to create service:  
sc \pc\_name create Winlogbeat binPath= ""C:\ProgramData\beats\winlogbeat\winlogbeat.exe" -c "C:\ProgramData\beats\winlogbeat\winlogbeat.yml" -path.home "C:\ProgramData\beats\winlogbeat" -path.data "C:\ProgramData\winlogbeat"" DisplayName= "Winlogbeat" type= own start= auto  
and start service  
sc \pc\_name start winlogbeat

before we stopped using smb1, we had script with menues for install, uninstall service, update config, check if installed and other.

if you need some details - ask me, i`ll try to help u

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 19, 2018, 4:11pm UTC](https://discuss.elastic.co/t/beat-agents-installation-on-multiple-servers-hosts/124847/3 "2018-04-19T16:11:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
