Currently I'm importing a csv file with just one Column named "Name", and I have all the data within the column currently comma separated. When I run the below code example, and then write the out-put I have a weird formatting issue going on which I hope you guys would be able to help. So I could just loop through each name within the array with clean data. Thanks!
$Name = Import-Csv C:\Users\example\documents\testObjects.csv
Here's an example of what the output looks like if I run it through a foreach loop.
foreach ($s in $Name)
{
write-host $s
}
@{Name=abc000100,}
@{Name=def0001000,}
I was hoping for help on how to separate it out so when it run through the foreach loop, it just includes only the name, and not the @{Name=,}. Thank you!