Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Hi all,
I have created a sample project for the PowerShell Conference Asia 2017 to demonstrate PowerShell Classes and its possible benefit. The project 'LogFileParser' by itself can be quiet useful and is completely extendable by capabilities in terms of log file types and filtering functions and therefore I wanted to share it with you.
The idea, which I used primarily for this, was filtering with RegEx as I have described in detail here.
You can find it in my Github and download it directly here.
Structure:
Examples:
Supported Types for now:
Loaded LogFileTypeClasses
CBS
DISM
Robocopy Output
All System Center Configuration Manager log files
Upgrade Logs: setupact.log & setuperr.log
WindowsUpdate.log
It is dynamically extendable and you can easily add your own LogClassFileTypes based on RegEx or add additional functions to LogFileTypes or even overwrite the parsing mechanism:
LogFileTypeClass with RegEx
Additional functions for a defined log file type - here WindowsUpdateLog:
You can just inherit the default class 'ParsedLogFile' and just add your functions for this particular log file types - example: GetWindowsUpdates in the WindowsUpdate.log:
I hope you like it.
All the best,
David das Neves
Premier Field Engineer, EMEA, Germany
Windows Client, PowerShell, Security
Please sign in to use this experience.
Sign in