![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Exporting partial Event Log as .evt file My first problem got solved - couldn't get "Win32_NTEventLogFile.BackupEventLog(path)" to work. Urkec pointed out that when connecting to a remote computer, WMI methods often can only write to a local path on that remote computer. Now I'm trying to figure out how to get a partial ".evt" file export, instead of exporting the entire log. For example, the following code exports the entire application log: Set colLogFiles = objWMIService.ExecQuery _ ("Select * from Win32_NTEventLogFile " _ & "Where LogFileName='Application'") For Each objLogfile in colLogFiles errBackupLog = objLogFile.BackupEventLog( _ remoteWMIpath & "EventLog.evt") .. . . but what if I want to retrieve only the last month's worth of entries? The "Win32_NTLogEvent" class facilitates qualification of each log event by date. Once a log event is qualified, however, it doesn't appear to me that there's a straight-forward way to export individually-qualified log events into a .evt file, such that the end result is formatted the same way it would have been with the Win32_NTEventLogFile.BackupEventLog class/method. Is there a simple way to get a partial date range exported as a "standard" ..evt file, without having to manually contruct each exported event? (assuming that such a manual contruct 's even possible) Thanks, David |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Exporting Outlook CSV file to Windows Mail | Microsoft Office | |||
| Exporting an Excel file | Vista General | |||
| Search partial file name | Vista file management | |||
| exporting results/text of powershell script to a file as it is run | PowerShell | |||
| Exporting an object to a csv file | PowerShell | |||