Tag Archive: ping list of servers

PowerShell – Ping all SCCM servers

Part of daily environment health checks is to verify that all SCCM infrastructure servers are reachable on the network.  Usually you can verify this by viewing the Monitoring tab in the SCCM console, but in cases where you have multiple standalone distribution point devices you may want to simply ping them to check their availability.  This PowerShell script will help you to do this task without having to write a batch file to ping each device.

# Script to ping all SCCM servers


foreach ($Server in $ServerName) {
if (test-Connection -ComputerName $Server -Count 2 -Quiet ) {
write-Host “$Server is online ” -ForegroundColor Green
} else
{ Write-Warning “$Server is offline ”