Last active
November 26, 2017 05:03
-
-
Save techthoughts2/0402f908de111c587552 to your computer and use it in GitHub Desktop.
Evaluates if device is capable of establishing a connection to a specified server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#test connection example | |
$server = "Server01" | |
if (Test-Connection $server -Count 1 -ErrorAction SilentlyContinue) { | |
#connection successful | |
} | |
else { | |
#connection not successful | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment