Hello @RoRoCola
I can recommend the next 2 articles with different examples and ideas on how to create it and implement it, depending on your needs:
https://devblogs.microsoft.com/scripting/use-powershell-to-parse-saved-event-logs-for-errors/
https://devblogs.microsoft.com/scripting/use-powershell-to-perform-offline-analysis-of-security-logs/
Hope this helps with your query,
--
--If the reply is helpful, please Upvote and Accept as answer--