Forum Discussion
CHILLimECK
Dec 12, 2018Copper Contributor
Powershell Parsing loggfile
Hello, i´m new to Powershell and need some help. I need to parse a logfile from a network licensemanager where 90% of the entries are denials. i wrote a script which works fine, but the time it nee...
JoP_SG
Dec 17, 2018Copper Contributor
Hello,
I would just filter the lines with a match and use the pipeline to write it out to a file.
This should be faster:
get-content "$Path\lmgrd.log" | Where-Object { if ($_ -notmatch "DENIED:") { $_ }} | Out-File ($path+$fileName)
- CHILLimECKDec 18, 2018Copper Contributor
Thanks, this solution works fine and much faster than my one.