![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | RE: How to convert Table-Format Data to CSV-Format? Try this: $out = @() switch -r (gc <AV Log File's path here>) { '^Date:' { $obj = new-object psObject } '^[^-]+' { $prop, $val = [regex]::split($_,':\s') $prop = $prop -replace '\s' if ($val) {$val = $val.trim()} add-member noteProperty $prop $val -in $obj } '^-+$' { $out += $obj rv obj } } if ($obj) { $out += $obj rv obj } $out | epcsv out.csv -not # now you got the data in a CSV file ipcsv out.csv -- Kiron |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| -f format Format-Table Format-List against Select | PowerShell | |||
| RE: How to convert Table-Format Data to CSV-Format? | PowerShell | |||
| RE: How to convert Table-Format Data to CSV-Format? | PowerShell | |||
| Format-table | PowerShell | |||
| How do I get format-table to drop that omission points (...) and display my data | PowerShell | |||