I've been fighting for over an hour for something that seems simple to me ... But I can not do it
Explanation :
I import a CSV who look like this, he's empty :
DAYS | PC1 | PC2
And i have a Variable "$Days" who look like this :
PS C:\Users> $Days
12/02/2019
13/02/2019
14/02/2019
15/02/2019
16/02/2019
All i want is to add every line to the "Days" column...
Like :
DAYS | PC1 | PC2
12/02/2019 | |
13/02/2019 | |
14/02/2019 | |
15/02/2019 | |
16/02/2019 | |
I try something like :
Foreach ($row in $Days){
$CSV.Days = $row
}
But he tell me that the property "Days" is not found.
i also try something like this :
$CSV | Select-Object @{Name='Days';Expression={$forearch ($row in $Days){$row}}},*
But no result again, i don't know what i'm doing wrong...
Thank you in advance for your help.
-delimiter '|'withImport-CSV$Days| ForEach-Object{[PSCustomObject]@{DAYS=$_;PC1="";PC2=""}}