I am relatively new to scripting and have been trying to solve a particular script problem in powershell, I am having difficult in exporting the output to a csv file, the script runs fine when displaying to the console but i either get string lengths or content relaring to the script. I am missing something with changing properties to content but cant seem to workout how to do it Many thanks in anticipation
import-csv "C:\scripts\test1\data-Raw.csv"|
foreach{
if ($_.Hide -eq 'True') { @{OutFinal=$_.OT_Pre,$_.extension}}
if ($_.Hide -eq 'False') { @{OutFinal=$_.extension,$_.extension}}
} | Export-Csv -NoTypeInformation "C:\scripts\test1\data-2.csv"