Hey guys,
I managed in the past to use .csv data as object with the import-csv cmdlet
Lately I tried to use the same cmdlet with csv data that looks like this
Device,Deployment
Device1,Deployment1
Device1,Deployment2
Device2,Deployment1
etc
And I’m not able to retrieve the data using like :
$csvfile = Import-Csv “PathtoCsv”
foreach ($line in $csvfile)
{
$device = $line.Device
$deployment = $line.Deployment
}
I guess this is because csv data is not considered like object right ? How can I do what I’d like to do here ?
Thanks for your help folks !
Narwo