I'm looking for some powershell to convert Listed properties into a CSV or Table, not all records in the list have the same Properties but the "Index" property signifies a new record.
INPUT
Index:1
FirstName:Bob
LastName:Smith
DOB:1/1/1970
Index:2
FirstName:John
DOB:1/1/1971
Index:3
LastName:Jones
DOB:1/1/1972
OUTPUT
FirstName,LastName,DOB
Bob,Smith,1/1/1970
John,,1/1/1971
,Jones,1/1/1972
Any help is greatly appreciated. Thanks