# Bulk index from .bat

**URL:** <https://discuss.elastic.co/t/bulk-index-from-bat/133484>\
**Category:** Elasticsearch\
**Created:** [May 28, 2018, 7:59am UTC](https://discuss.elastic.co/t/bulk-index-from-bat/133484 "2018-05-28T07:59:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![delly.set](https://avatars.discourse-cdn.com/v4/letter/d/ac91a4/32.png) [@delly.set](https://discuss.elastic.co/u/delly.set)\
**Post date:** [May 28, 2018, 7:59am UTC](https://discuss.elastic.co/t/bulk-index-from-bat/133484/1 "2018-05-28T07:59:04Z")

</div>

Hi,

i want to run bulk index API from .bat file. The .bat file will run with Windows Task Scheduler under domain user which has 'superuser' role in the elasticsearch. So that I do not need to mentioned '--user : ' in the bulk index api.

But it fails. any other suggestion?

i don't want to put my password in the .bat file due to security concern.

Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 28, 2018, 9:12pm UTC](https://discuss.elastic.co/t/bulk-index-from-bat/133484/2 "2018-05-28T21:12:08Z")

</div>

Please don't ask the same question more than once, it makes it harder for people to help 🙂

> [@Automate bulk index](https://discuss.elastic.co/t/automate-bulk-index/133565):
>
> hi possible to run 'bulk index' API using CURL via windows task scheduler? I want to do bulk index every hourly. but how to secure my the username and password (--user uname:pwd) in the curl command ? my Elasticsearch is integrated with AD realms. any help is appreciated.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 28, 2018, 9:12pm UTC](https://discuss.elastic.co/t/bulk-index-from-bat/133484/3 "2018-05-28T21:12:12Z")

</div>

Closed on May 28, 2018, 9:12pm UTC


