Thursday, August 10, 2017




Using PowerShell Test-Connection


#(1)_.Check if  Machine is responding

Clear-host
Write-host $null
#(a)_Capture Server name
$server = Read-host “_Provide Server Name to Test”

#(b)_. Test Connection
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: