# Metricbeat 7.0.0 on Windows x64 Elasticsearch template setup error

**URL:** <https://discuss.elastic.co/t/metricbeat-7-0-0-on-windows-x64-elasticsearch-template-setup-error/177313>\
**Category:** Beats\
**Created:** [April 17, 2019, 2:11pm UTC](https://discuss.elastic.co/t/metricbeat-7-0-0-on-windows-x64-elasticsearch-template-setup-error/177313 "2019-04-17T14:11:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chernomazov](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Chernomazov](https://discuss.elastic.co/u/Chernomazov)\
**Post date:** [April 17, 2019, 2:11pm UTC](https://discuss.elastic.co/t/metricbeat-7-0-0-on-windows-x64-elasticsearch-template-setup-error/177313/1 "2019-04-17T14:11:09Z")

</div>

Metricbeat: 7.0.0  
ELK: 7.0.0  
OS: MS Windows Server 2016 Core

I call on the Elasticsearch host

> metricbeat setup --template -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]'

and I get

> Error: invalid argument "'output.elasticsearch.hosts=[localhost:9200]'" for "-E, --E" flag: expected ',' when parsing '[localhost:9200]''

I just copy the command from documentation!

---

<div class="post-metadata">

**Author:** ![dedemorton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dedemorton/32/84409_2.png) [@dedemorton](https://discuss.elastic.co/u/dedemorton)\
**Post date:** [April 17, 2019, 7:26pm UTC](https://discuss.elastic.co/t/metricbeat-7-0-0-on-windows-x64-elasticsearch-template-setup-error/177313/2 "2019-04-17T19:26:32Z")

</div>

It looks like you are running the command on Windows. You need to run the following command from a powershell prompt as described in the [documentation](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-template.html#load-template-manually).

```auto
.\metricbeat.exe setup --template -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]'

```

---

<div class="post-metadata">

**Author:** ![Chernomazov](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Chernomazov](https://discuss.elastic.co/u/Chernomazov)\
**Post date:** [April 18, 2019, 5:13am UTC](https://discuss.elastic.co/t/metricbeat-7-0-0-on-windows-x64-elasticsearch-template-setup-error/177313/3 "2019-04-18T05:13:53Z")

</div>

@dedemorton  
You're absolutely right! Thanks.

Probably it will be useful to add some checks to run such operations in the Powershell with plain error messages.

---

<div class="post-metadata">

**Author:** ![dedemorton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dedemorton/32/84409_2.png) [@dedemorton](https://discuss.elastic.co/u/dedemorton)\
**Post date:** [April 18, 2019, 5:31pm UTC](https://discuss.elastic.co/t/metricbeat-7-0-0-on-windows-x64-elasticsearch-template-setup-error/177313/4 "2019-04-18T17:31:50Z")

</div>

That's a good idea. You can request this by opening [an enhancement request](https://github.com/elastic/beats/issues/new?template=feature-request.md) in the beats repo.

---

<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:** [May 16, 2019, 7:32pm UTC](https://discuss.elastic.co/t/metricbeat-7-0-0-on-windows-x64-elasticsearch-template-setup-error/177313/5 "2019-05-16T19:32:02Z")

</div>

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