I am using Powershell to import an XML file and I would like to format the data as a datatable.
Using the question below I can view the data as a table in the powershell console.
The powershell I produced from this question is shown below.
$peakPrices = $dt.heml.Transactions.Record | format-table -AutoSize -Property @{Label="Period";Expression={$_.column[0]."#text"}},
@{label="PeaksBid";Expression={$_.column[9]."#text"}}, @{label="PeaksOffer";Expression={$_.Column[11]."#text"}}, @{label="ReportDate";Expression={$todaysDate}}
This produces a nice view of the data in the form of a table but I dont seem to be able to do what I want with it i.e. loop through each row and do stuff.
The resultant table from the code above looks similar to this.
I would like to change this data to a datatable as I am competent at manipulating these. Is this something I can do?

Select-Objectinstead ofFormat-Table