get-content active_hosts_ping.txt | measure-object -words
get-content active_hosts_ping.txt | measure-object -line
get-content active_hosts_ping.txt | measure-object -character
*****
$names = Get-content "c:\users\john\hnames.txt"
foreach ($name in $names){
if (Test-Connection -ComputerName $name -Count 1 -ErrorAction SilentlyContinue)
{
Write-Host "Host $name repsonding to ping ."
}
else
{
Write-Host "Host $name not responding to ping ."
}
}