I've been creating a psobject containing two properties and exporting to a csv.
I want to be able to import that data back in, add another record, sort it and then recreate the csv.
How can I do this, preferably in both ver 2 & 3?
$obj = new-object psobject
$obj | add-member noteproperty CustName "John"
$obj | add-member noteproperty CustAge "25"
$obj | export-csv agedata.csv
$CustInfo = import-csv agedata.csv
$newcust's name and age will be function [string]parameters
$CustInfo += $newCust does not work for me (have seen several examples showing this)