Collect EventLog hourly into a single file

时间:2016-11-09 08:27:52

标签: powershell reporting event-log

Is it possible to collect EventLog entries every hour and then save it into a single file in PowerShell?

1 个答案:

答案 0 :(得分:1)

使用Get-EventLog cmdlet检索日志,使用Out-File cmdlet将其保存到文件,并使用New-ScheduledTask cmdlet安排脚本。