Skip to main content
rashid lab
CAPTCHA
Image CAPTCHA
Get new captcha!
Enter the characters shown in the image.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Main navigation

  • Home
  • About Us
  • Knowledge Base
    • Never Stop Learning!
    • Safer Internet
    • Vulnerabilities
  • Contact
CAPTCHA
Image CAPTCHA
Get new captcha!
Enter the characters shown in the image.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
User account menu
  • Log in

Breadcrumb

  1. Home

How to ping multiple IP addresses at once?

By rashid, 29 July, 2024

Of you want to ping multiple hosts i.e. IP addresses at in parallel and then try this PowerShell  script. This script will create an output file either .txt or .csv format.

$names=Get-content ".\ping_ip_address.txt"
foreach($name in $names)
{
if(Test-Connection -ComputerName $name -Count 1 -ErrorAction SilentlyContinue)
{
Write-Host "$name is Working" -ForegroundColor Green
$output+="$name is up,"+"`n"
}
else
{
Write-Host "$name is Not-Working" -ForegroundColor Red
$output+="$name is down,"+"`n"
}
}
$output | Out-File ".\ping_ip_address_result.csv" 
Start-Sleep -s 100

https://learn.microsoft.com/en-us/answers/questions/692649/script-to-ping-multiple-hosts-and-return-if-the-ip

 

  • Log in to post comments

Comments


Never Stop Learning

RSS feed