Server,IPAddress
server1,192.168.1.10
server2,192.168.1.11
You can import it with the following statement:
$csvfile = Import-Csv C:\Book2.csv
foreach ($value in $csvfile){
$hostname = $value.server
$IP = $value.IPAddress
Write-Host "do whatever here to $hostname with IP address: $IP"
}
No comments:
Post a Comment