# Loading Index Template of Filebeat into Elasticsearch in Windows

**URL:** https://discuss.elastic.co/t/loading-index-template-of-filebeat-into-elasticsearch-in-windows/105241
**Category:** Beats
**Tags:** filebeat
**Created:** [October 25, 2017, 12:24pm UTC](https://discuss.elastic.co/t/loading-index-template-of-filebeat-into-elasticsearch-in-windows/105241 "2017-10-25T12:24:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Mahmood\_Shehab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahmood_shehab/32/23377_2.png) [@Mahmood\_Shehab](https://discuss.elastic.co/u/Mahmood_Shehab)
#### Post date: [October 25, 2017, 12:24pm UTC](https://discuss.elastic.co/t/loading-index-template-of-filebeat-into-elasticsearch-in-windows/105241/1 "2017-10-25T12:24:05Z")

</div>

Following the guide in this [link](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-template.html) to add a **filebeat-template**. I got the this error:

 ![1](https://us1.discourse-cdn.com/elastic/original/3X/1/0/10ecc3ac10ece102f3d7e579376a7b4c9c0a8d19.png)

Then, I added **-Credential** switch in to PS command followed by the elastic username:

 ![2](https://us1.discourse-cdn.com/elastic/original/3X/7/c/7cd758f907d2568f514d4412ee5a41e19610d601.png)

Powershell accepted the command and prompt for the password:

![3](https://us1.discourse-cdn.com/elastic/original/3X/d/a/daa0efe493062c4d025ea4f17f877fef147d31a9.png)

And the template was successfully imported.

 ![4](https://us1.discourse-cdn.com/elastic/original/3X/6/2/62394691d81b05821802d33b65ed128238428e60.png)

---

<div class="post-metadata">

### Author: ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)
#### Post date: [October 25, 2017, 2:41pm UTC](https://discuss.elastic.co/t/loading-index-template-of-filebeat-into-elasticsearch-in-windows/105241/2 "2017-10-25T14:41:02Z")

</div>

If your Elasticsearch requires authentication, you need to provide credentials to be able to load index templates. I guess you are using X-Pack, where basic authentication is default.

May I ask you what is your question regarding the behavior you described above?

---

<div class="post-metadata">

### Author: ![Mahmood\_Shehab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahmood_shehab/32/23377_2.png) [@Mahmood\_Shehab](https://discuss.elastic.co/u/Mahmood_Shehab)
#### Post date: [October 26, 2017, 4:39am UTC](https://discuss.elastic.co/t/loading-index-template-of-filebeat-into-elasticsearch-in-windows/105241/3 "2017-10-26T04:39:25Z")

</div>

Thanks for your replay.

Since this a discussion forum, I shared this experience for the people who might get into this issue to shorten the overhead for them because I spent 30 mins searching for the answer.

Regards,  
Mahmood

---

<div class="post-metadata">

### Author: ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)
#### Post date: [October 26, 2017, 12:39pm UTC](https://discuss.elastic.co/t/loading-index-template-of-filebeat-into-elasticsearch-in-windows/105241/4 "2017-10-26T12:39:31Z")

</div>

Great! Thanks for sharing it with us.

---

<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: [November 23, 2017, 12:39pm UTC](https://discuss.elastic.co/t/loading-index-template-of-filebeat-into-elasticsearch-in-windows/105241/5 "2017-11-23T12:39:59Z")

</div>

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