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