Facing issue while installing filebeat 6.2.4

(priti bhangale) #1

While installing filebeat , i am getting below error. Please help.

File C:\Filebeat\install-service-filebeat.ps1 cannot be loaded. The file C:\Filebeat\install-service-filebeat.ps1 is
not digitally signed. You cannot run this script on the current system. For more information about running scripts and
setting execution policy, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
+ CategoryInfo : SecurityError: (:slight_smile: [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnauthorizedAccess

(Christian Stockhaus) #2

you will have to start the powershell in an Unrestricted mode
the simpelst way is to use cmd and execute the following in the filebeat dir

PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-winlogbeat.ps1

see https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-installation.html#filebeat-installation
last grey box

(priti bhangale) #3

After run above command also getting unauthorized access error.

(Christian Stockhaus) #4

don't execute it in Powershell but in cmd.exe

(priti bhangale) #5

from cmd.exe also getting same error

(Christian Stockhaus) #6

sorry forgotten to say you will need to start cmd.exe as administrator
Hopefully then it will work (i always work as admin on our server so that was not obvious to me...)

If that doesn't help than i'm out of ideas beside to install the service manually
the parameter you can partially get from the ps script

(Saketh Chandra Kolisetty) #7

when i try to run as an administrator this is what happens:

PS C:\Program Files\Filebeat> PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-filebeat.ps1.

Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your
computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning
message. Do you want to run C:\Program Files\Filebeat\install-service-filebeat.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"): R

Status Name DisplayName

Stopped filebeat filebeat

(Christian Stockhaus) #8

yeah thats good the service is installed
now you only must start it like you start every windows service (services in start)
don't forget to double check your config before you start the service

(priti bhangale) #9

For me not asking to select any option, directly giving error.

(Saketh Chandra Kolisetty) #10

I would suggest running it on the power shell as an administrator rather than command prompt.

(Saketh Chandra Kolisetty) #11

thanks man !

(system) #12

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