I need to capture w32time events to a text file for a silly compliance requirement. Is there a way to that in Windows?
Quick answer; manually, from Event Viewer, click on the System Log, then go to View > Filter and choose
Long answer is, scripting. Use WMI to query the
Cheating option, if you can't be bothered; from a
You didn't specify which version of Windows you are running. Starting with Win2k8 you can attach tasks to events, so some automation is possible. You would have to write a script that can then append the event to a text file. Unfortunately it's a bit tedious since you'd have to set that up for every event id I believe.
Another option is to setup an event log monitoring tool like EventSentry which can monitor your event log in real time and log events (according to your rules) to a variety of formats, including text files and databases. The advantage is that your event log is now monitored in real-time, and it scales to multiple machines as well if need be. You also get the added benefit of having access to additional useful features.
Disclaimer: I work for netikus.net.