# Installing Filebeat

**URL:** <https://discuss.elastic.co/t/installing-filebeat/273771>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 23, 2021, 9:19pm UTC](https://discuss.elastic.co/t/installing-filebeat/273771 "2021-05-23T21:19:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasieltego](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasieltego/32/77950_2.png) [@jasieltego](https://discuss.elastic.co/u/jasieltego)\
**Post date:** [May 23, 2021, 9:19pm UTC](https://discuss.elastic.co/t/installing-filebeat/273771/1 "2021-05-23T21:19:51Z")

</div>

Hi All,

I have downloaded Filebeat and trying to install per instruction provided on the site.  
I have extracted it to `C:\Program Files` , I have renamed it and ran powershell as admin as well.  
When I run the command C:\Program Files\Filebeat\> .\install-service-filebeat.ps1  
I get the following error message

```auto
At line:9 char:23
+ $workdir = Split-Path $MyInvocation.MyCommand.Path
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidData: (:) [Split-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.SplitPathCommand

```

---

<div class="post-metadata">

**Author:** ![jasieltego](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasieltego/32/77950_2.png) [@jasieltego](https://discuss.elastic.co/u/jasieltego)\
**Post date:** [May 23, 2021, 10:26pm UTC](https://discuss.elastic.co/t/installing-filebeat/273771/2 "2021-05-23T22:26:44Z")

</div>

I was able to get it to work.  
Just to share with everyone I changed the variable $workdir to:  
$workdir = 'C:\Program Files\Filebeat'

That is my solution.

---

<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 25, 2021, 12:02am UTC](https://discuss.elastic.co/t/installing-filebeat/273771/3 "2021-05-25T00:02:34Z")

</div>

Thanks for sharing your solution!

---

<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:** [June 22, 2021, 2:03am UTC](https://discuss.elastic.co/t/installing-filebeat/273771/4 "2021-06-22T02:03:15Z")

</div>

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