# Logstash 7.5.0 as Windows service using SC commands on command prompt

**URL:** <https://discuss.elastic.co/t/logstash-7-5-0-as-windows-service-using-sc-commands-on-command-prompt/218135>\
**Category:** Logstash\
**Tags:** windows\
**Created:** [February 6, 2020, 10:07am UTC](https://discuss.elastic.co/t/logstash-7-5-0-as-windows-service-using-sc-commands-on-command-prompt/218135 "2020-02-06T10:07:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sagardhakate](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sagardhakate/32/62179_2.png) [@sagardhakate](https://discuss.elastic.co/u/sagardhakate)\
**Post date:** [February 6, 2020, 10:07am UTC](https://discuss.elastic.co/t/logstash-7-5-0-as-windows-service-using-sc-commands-on-command-prompt/218135/1 "2020-02-06T10:07:34Z")

</div>

I am not able to run logstash 7.5.0 as windows service using SC commands on command prompt.

C:\>sc \VIMPHYT01-22 create "Elasticsearch Logstash-7.5.0" binpath=C:\Users\sagar.dhakate\Software\ElasticStack\logstash-7.5.0\logstash-7.5.0\bin\logstash.bat start= auto  
[SC] CreateService SUCCESS

C:\>sc \VIMPHYT01-22 config "Elasticsearch Logstash-7.5.0" depend= elasticsearch-service-x64  
[SC] ChangeServiceConfig SUCCESS

C:\>sc \VIMPHYT01-22 config "Elasticsearch Logstash-7.5.0" DisplayName= "Elasticsearch Logstash-7.5.0"  
[SC] ChangeServiceConfig SUCCESS

How to execute the command "-f C:\Users\sagar.dhakate\Software\ElasticStack\logstash-7.5.0\logstash-7.5.0\bin\sample.conf" which is ingesting the data into elasticsearch?

Please help me here.  
Note- I don't want to use Task Scheduler or NSSM.

---

<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:** [March 5, 2020, 10:07am UTC](https://discuss.elastic.co/t/logstash-7-5-0-as-windows-service-using-sc-commands-on-command-prompt/218135/2 "2020-03-05T10:07:35Z")

</div>

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