LogFileParser
Gathers a defined subset of logs and creates a queryable class for it.
Examples
Dot Sourcing
. 'C:\OneDrive## Sources\Git\LogFileParser\LogFileParser.ps1'
loading complete directory recursive
$newLogParser = [LogFileParser]::new('C:\OneDrive## Sources\Git\DemoLogs')
loading a specific file
$newLogParser = [LogFileParser]::new('C:\OneDrive## Sources\Git\DemoLogs\DISM\dism.log')
$newLogParser = [LogFileParser]::new('C:\OneDrive## Sources\Git\DemoLogs\CBS\cbs.log')
$newLogParser = [LogFileParser]::new('C:\OneDrive## Sources\Git\DemoLogs\Upgrade\setupact.log')
$newLogParser = [LogFileParser]::new('C:\OneDrive## Sources\Git\DemoLogs\Upgrade\setuperr.log')
$newLogParser = [LogFileParser]::new('C:\OneDrive## Sources\Git\DemoLogs\SCCM\ccmexec.log')
information of actual data
$newLogParser $newLogParser.ParsedLogFiles $newLogParser.ParsedLogFiles | Select-Object LogFilePath, LogFileType
show data
$newLogParser.ParsedLogFiles[0].ParsedLogData
columns of data, which can be used for conditions
$newLogParser.ParsedLogFiles[0].GetColumnNames()
gather only rows, which contain errors and show them
($newLogParser.ParsedLogFiles[0].ParsedLogData).Where{$_.Entry -like 'error'} | Out-GridView
Row conditions
(
Time conditions
($newLogParser.ParsedLogFiles[0].ParsedLogData)[0].Time
last 2 days
($newLogParser.ParsedLogFiles[0].ParsedLogData).Where{ $_.DateTime -gt ([DateTime]::Now).AddDays(-2) }