Ping that returns a Boolean

PS C:\Users\SivaMulpuru> Test-Connection google.com -Quiet -Count 1
True

PS C:\Users\SivaMulpuru> Test-Connection google.local -Quiet -Count 1
False

Good practice to check for the host’s state before making a connection.

Reference

http://technet.microsoft.com/en-us/library/dd315259.aspx

Leave a comment

Your email address will not be published. Required fields are marked *