In this article, i will show you how to ping  a network or a range of ip address with Powershell script.

Introduction

In this script, you need to mention the subnet, starting IP and Ending IP. Also you have the option to set ping count

$subnet = "192.168.160.0"
$start = 60
$end = 75
$ping = 1
while ($start -le $end) {
$IP = "192.168.160.$start"
Write-Host "Pinging $IP" -ForegroundColor Green
Test-Connection -ComputerName $IP -count 1 -Quiet 
$start++ 
}

The status should be something similar to below screenshot

Powershell output