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-Connectionto 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
SMBtraffic withDC1:Test-NetConnection -ComputerName DC1 -CommonTCPPort SMB
- Get a detailed connectivity check by using
DC1with HTTP:$TNCHT = @{ ComputerName = 'DC1' CommonTCPPort = 'HTTP' InformationLevel = 'Detailed' } Test-NetConnection @TNCHT - Look for a particular port (that is,
SMBonDC1):Test-NetConnection...