You forgot to post your script along with the sample data and where you’ve got stuck with your script.
If you don’t have anything to show yet and if theres no module or script out there at the internet you will have to create your own LUA parser probably.
I’d think you could start with Get-Content maybe …
… and with the -match comparison operator …
… or if the structure is consistent enough you could use Select-String with the parameter -Context …
… to try to find the “ART..” keyswords and the following 2 lines and parse the file this way.
And BTW: At least for me it’s unclear what you meant with
Please post a sample snippet of the desired CSV file fitting the sample input data you posted.
When you post code, error messages, console ouput or sample data please format it as code using the “preformatted text” button ( </> )
Thanks in advance.
Another approach could be to use Sophisitcated Techniques of Plain Text Parsing like Tobias explains it in this video:
The next thought came to my mind is if this data comes from LUA it might not be the best idea to try to process them with PowerShell. There might be a way to get the data you’re after in a more common format in the first place. … like CSV or proper JSON or XML or YAML or anything less exotic than LUA.