$output = @' '@ foreach ($i in gc comps.txt) { if (Test-Connection $i -Quiet -Count 2) { switch((gi "\\$i\C$\1\1.txt").length / 1mb) { {$_ -gt 0 -and $_ -le 2} {$output+="";break} {$_ -gt 2 -and $_ -le 4} {$output+="";break} {$_ -gt 4 } { $output+="";break} default {$output+= ""} } } else {$output+= ""} } $output += @'
ComputerNameLength
$i$_
$i$_
$i$_
$iфайл не найден
$i - не отвечаетфайл не найден
'@ $output | Out-File Result.html