techthoughts2
12/28/2015 - 3:30 PM

Test-Connectivity example

Evaluates if device is capable of establishing a connection to a specified server

#test connection example
$server = "Server01"
if (Test-Connection $server -Count 1 -ErrorAction SilentlyContinue) {
    #connection successful
}
else {
    #connection not successful
}