Is there a way to search through all event file logs in a folder?<\/p>\n
I’ve tried the following code but it didn’t seem to work<\/p>\n
$EventLogonIDs=\"4720\"Get-WinEvent -FilterHashtable @{Path=\"C:\\windows\\system32\\winevt\\Logs\\Security*.evtx\";id= @($EventLogonIDs);StartTime=\"1/1/2017\";EndTime=\"1/8/2023\"} | Export-Csv c:\\result.csv\n\n<\/code><\/pre>","upvoteCount":4,"answerCount":7,"datePublished":"2021-05-11T03:19:21.000Z","author":{"@type":"Person","name":"hilzz2","url":"https://community.spiceworks.com/u/hilzz2"},"suggestedAnswer":[{"@type":"Answer","text":"
Advertisement
Is there a way to search through all event file logs in a folder?<\/p>\n
I’ve tried the following code but it didn’t seem to work<\/p>\n
$EventLogonIDs=\"4720\"Get-WinEvent -FilterHashtable @{Path=\"C:\\windows\\system32\\winevt\\Logs\\Security*.evtx\";id= @($EventLogonIDs);StartTime=\"1/1/2017\";EndTime=\"1/8/2023\"} | Export-Csv c:\\result.csv\n\n<\/code><\/pre>","upvoteCount":4,"datePublished":"2021-05-11T03:19:21.000Z","url":"https://community.spiceworks.com/t/search-through-all-archived-event-logs-in-folder/799461/1","author":{"@type":"Person","name":"hilzz2","url":"https://community.spiceworks.com/u/hilzz2"}},{"@type":"Answer","text":"If you post code, please use the ‘Insert Code’ button. Please and thank you!<\/p>\n