安装Winlogbeat日志采集器
- Winlogbeat安装程序可通过其官网(https://www.elastic.co/cn/beats/winlogbeat)下载。
- 双击启动安装程序,进入安装向导后勾选“I accept the terms in the License Agreement”,单击【Install】,如图所示。
- 按安装向导安装完成后,单击【Finish】,完成安装并打开安装目录。如图所示。
以管理员身份打开 PowerShell 提示符(右键单击 PowerShell 图标,然后选择以管理员身份运行),允许在本地主机上创建winlogbeat服务,创建成功后允许winlogbeat服务并验证。如图所示。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25PS C:\Windows\system32> cd "C:\Program Files\Elastic\Beats\8.13.2\winlogbeat"
# 允许在本地计算机上编写的未签名脚本自由运行
PS C:\Program Files\Elastic\Beats\8.13.2\winlogbeat> set-executionpolicy remotesigned
执行策略更改
执行策略可帮助你防止执行不信任的脚本。更改执行策略可能会产生安全风险,如 https:/go.microsoft.com/fwlink/?LinkID=135170
中的 about_Execution_Policies 帮助主题所述。是否要更改执行策略?
[Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) [S] 暂停(S) [?] 帮助 (默认值为“N”): y
# 允许脚本在系统上运行
PS C:\Program Files\Elastic\Beats\8.13.2\winlogbeat> set-executionpolicy Bypass
执行策略更改
执行策略可帮助你防止执行不信任的脚本。更改执行策略可能会产生安全风险,如 https:/go.microsoft.com/fwlink/?LinkID=135170
中的 about_Execution_Policies 帮助主题所述。是否要更改执行策略?
[Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) [S] 暂停(S) [?] 帮助 (默认值为“N”): y
# 创建winlogbeat服务
PS C:\Program Files\Elastic\Beats\8.13.2\winlogbeat> .\install-service-winlogbeat.ps1
[SC] DeleteService 成功
Status Name DisplayName
------ ---- -----------
Stopped winlogbeat winlogbeat
# 启动winlogbeat服务
PS C:\Program Files\Elastic\Beats\8.13.2\winlogbeat> Start-Service winlogbeat
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 云野阁!
评论