0

I know this question has like 100's of similar questions. i have gone through most of them and they are outdated and doesn't seem to perform well.

I am trying to read event logs from remote computers using c#, the way which i am currently during is really slow (reading 60,000 logs) takes about 30 mins.

I am using

 EventLogReader Class

I have also tried Event Log Query and some WMI way. But truly speaking they are all really slow.

There most be some other way of doing this. How can I read them faster?

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
Bravo11
  • 898
  • 2
  • 11
  • 24

1 Answers1

0

I don't know if this is faster, but worth a shot

My suggestion is to skip the eventlogreader class and go straight to WMI ( where you may be able to query just what you want.

Also, you can get the remote machine to backup the event log then try copying the backup...

see

http://msdn.microsoft.com/en-us/library/windows/desktop/aa394593(v=vs.85).aspx

you may want to look at

How to construct WMI query

on how to do WMI From C#

Community
  • 1
  • 1
Keith Nicholas
  • 43,549
  • 15
  • 93
  • 156