检测主机的连通性
foreach ($v in (import-csv .\ODS_D1.csv)) {
if (Test-Connection -count 1 -quiet $v.ip) {
$v.name + " OK"
} else {
$v.name + " NOT OK"
}
}
检测主机的连通性
foreach ($v in (import-csv .\ODS_D1.csv)) {
if (Test-Connection -count 1 -quiet $v.ip) {
$v.name + " OK"
} else {
$v.name + " NOT OK"
}
}
本文标题:2021-12-15 powershell import-csv
本文链接:https://www.haomeiwen.com/subject/nlypfrtx.html
网友评论