Checking network connectivity
One of the first things you can do in terms of troubleshooting is to determine whether you have network connectivity between your hosts.
Getting ready
This recipe uses servers in the Reskit.Org
domain (DC1
, DC2
, SRV1
, and SRV2)
that you have previously installed. Run this recipe on SRV1
.
How to do it...
Use
Test-Connection
to test the connection toDC1
:Test-Connection -ComputerName DC1
Redo the test with a simple true/false return:
Test-Connection -ComputerName DC1 -Quiet
Test multiple systems at once:
Test-Connection -ComputerName 'DC1','DC2','SRV2' -Count 1
Test the connectivity for
SMB
traffic withDC1
:Test-NetConnection -ComputerName DC1 -CommonTCPPort SMB
Get a detailed connectivity check by using
DC1
with HTTP:$TNCHT = @{ ComputerName = 'DC1' CommonTCPPort = 'HTTP' InformationLevel = 'Detailed' } Test-NetConnection @TNCHT
Look for a particular port (that is,
SMB
onDC1
):Test-NetConnection -ComputerName DC1 -Port 445
Look for a host that does not exist...