Thursday, June 9, 2016

Check server connectivity through powershell

$srvname= "srv1","srv2","srv3","srv4","srv5"


foreach ($item in $srvname)

{

if (test-Connection -ComputerName $Server -Count 3 -Quiet )
{

write-Host "Server is Pinging "
       
}

else
                   
{

Write-Warning "Server is not pinging"
           
}   
       
}
 

No comments:

Post a Comment

Thanks for showing interest in tech-jockey.

Content of this blog has been moved to GITHUB

Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...