我想要统计远程服务器的系统事件日志有多less个错误有没有一种方法使用Powershell或类似的东西来计算发生了多less错误,然后将其保存在文件中?
要列出someremotehost上System日志中的所有Errortypes:
Get-EventLog -LogName System -EntryType Error -ComputerName someremotehost
要数它们:
Get-EventLog -LogName System -EntryType Error -ComputerName someremotehost | Measure-Object