The article provides an example of using the Import-csv
command in PowerShell.
Sample CSV Structure:
1 2 | #ServeurName;Ipstart;IpEnd;Description #Repli.leblogosd.lan;192.168.0.1;192.168.0.254;ServeurLab |
Script example
1 2 3 4 5 6 7 | $CSVs = Import-Csv $PreferedServerCSV -Delimiter ";" foreach ( $CSV in $CSVs ) { $Serveur = $CSV .ServeurName $Ipdebut = $CSV .Ipstart $IpFin = $CSV .IpEnd $Description = $CSV .Description } |
0 Comments