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