Home > Database > Mysql Tutorial > 使用PowerShell获得Windows Event Log

使用PowerShell获得Windows Event Log

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:37:47
Original
981 people have browsed it

1.创建存储服务器名称的文件computer.csv2.创建PowerShell脚本,通过读取第一步创建的服务器名称,查询EventLog的信息然后存储到CSV文件。代码如下:3.保存脚本

1.创建存储服务器名称的文件computer.csv

164331430.png

2.创建PowerShell脚本,通过读取第一步创建的服务器名称,查询EventLog的信息然后存储到CSV文件。代码如下:

164333977.png

3.保存脚本为test.ps1然后执行可以看到EventLog已经保存到CSV文件。

164335456.png

可以看到通过简单的几行代码可以收集所有服务器上的EventLog进行分析。

本文出自 “关注SQL Server技术” 博客,,请务必保留此出处

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Can Windows be learned?
From 1970-01-01 08:00:00
0
0
0
Install PHP in windows environment
From 1970-01-01 08:00:00
0
0
0
zookeeper extension under windows
From 1970-01-01 08:00:00
0
0
0
Can I play vim happily on Windows?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template