I am new to Powershell.I have a csv file named samplemap.csv with values . I have to read each value from the file, like example a variable to define the value of paris_App.
CntryApp Version
paris_App 2.19
ila_App 5.3
sga_App 3.10
The code I used is printing all the CntryApp version , not printing each CntryApp version separately
Import-CSV "H:\samplemap.csv"
$CntryApp = @()
$Version = @()
Import-CSV "H:\samplemap.csv" -Delimiter ';'
ForEach-Object {
$CntryApp += $_.CntryApp
$Version += $_.Version
}
Expected 2.19,5.3,3.10 to be assigned to a indivdual variable . I mean each CntryApp version to be assigned to a variable.
$Mappingto haveparis_App,ila_Appandsga_Appand$versionto have all three versions? From the code I personally have no idea what you want to achieve...