Skip to content

Instantly share code, notes, and snippets.

@techthoughts2
Last active November 26, 2017 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techthoughts2/0402f908de111c587552 to your computer and use it in GitHub Desktop.
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
#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