Facing issue while installing filebeat 6.2.4

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

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

1 Like

After run above command also getting unauthorized access error.

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

from cmd.exe also getting same error
image

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
https://support.microsoft.com/en-us/help/251192/how-to-create-a-windows-service-by-using-sc-exe
the parameter you can partially get from the ps script

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

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

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

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

thanks man !

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