Unfortunately none of the referred answers are remotely solving the issue. Most of the solutions are either generic and do not apply or too specific to their related issues.
I have the output of 7-zip app, when I calculate hashcode of a given folder: ."$env:ProgramFiles\7-Zip\7z.exe" h C:\temp\ | select -skiplast 10 -skip 6
CRC32 Size Name
-------- ------------- ------------
Temp\
54D2639E 1274 Temp\.log
Temp\CC\
362CADDA 15360 Temp\CC\install.log
7D41A917 19204 Temp\exitCode7.zip
63EB42A5 1003850 Temp\master.hash.txt
I want to parse that into powershell array of hashtables
$(
${CRC32='value', Size='value', Name='value' },
...
)
ConvertFrom-SourceTablescript (which you can install with, e.g.,Install-Script ConvertFrom-SourceTable -Scope CurrentUseror, in PowerShell 7, withInstall-PSResource ConvertFrom-SourceTable -Scope CurrentUser) can handle your data format by default (no parameters needed) and it is a good command to have installed in general, as it is quite versatile. If you still want to roll your own solution: this answer to the first duplicate now works with your data format too.