Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Ping Bulk of computers

$
0
0

Hi Guys,


I made this query for getting computers are available and not available:

#Set-ExecutionPolicy remotesigned -Force $Server = Get-Content C:\users\xxx\Documents\AllServers.txt ForEach ($Ping in $Server) { if ( Test-Connection $Ping -Count 1 -ErrorAction SilentlyContinue) {Write-Host $Ping "is running" -f "white"} else

{Write-Host $Ping "server is down" -f "Red"} }

The problem is that result is "Server is Down" even if it is not down..

the Notepad contains all server on my OU,

If I reduce  servers to 10-5 it working.


Can someone assist?




My Website:www.Pelegit.co.il Mcitp /Mcsa 2012




Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>