Saturday, August 12, 2017


PowerShell Check if Server is alive

Use the script below to check if a server is alive # replace the server name to make it fit into your needs.

$server = “dc1.smtp25.org”

If (Test-Connection $server -count 1 -quiet) {
  Write-host  “The $server responded” -f yellow
}
else{

Write-host  “No connection to $server -f red
  Write-host “Script will stop” -f red
   Break
}



Oz Casey, Dedeal
Systems Engineer
http://smtp25.blogspot.com/ (Blog)
http://telnet25.wordpress.com/ (Blog)
https://twitter.com/Message_Talk (Twitter)


No comments: