Read file with name=value

Hello,

I have log file with contents like below:

[pre]date=2020-03-17 time=20:56:17 logid=“0000000013” type=“traffic” subtype=“forward” …

date=2020-03-17 time=20:56:27 logid=“0000000013” type=“traffic” subtype=“forward” …

date=2020-03-17 time=20:56:37 logid="0000000013" type="traffic" subtype="forward" ........[/pre]
I tried read it with ConvertFrom-CSV but have strange results...

Does someone have and idea how to read such content and create from it object with named parameters like “date”, “time”, “logid”, etc.

Best Regards

Daniel

When you post code or sample data or console output you should format it as code using the code tags “PRE” … please read the instructions: Read Me Before Posting! You’ll be Glad You Did!

For your task you should take a little time and watch this video. It will teach you everything you need:

Sophisticated Techniques of Plain Text Parsing