Skip to content

Windows Network Diagnosis Tools Guide

This article provides a structured approach for identifying communication issues in Windows Server environments using built-in commands and PowerShell tools. It covers ICMP connectivity testing, TCP port checks, DNS resolution, and log analysis.

The following placeholders represent environment-dependent values. Replace them with your actual settings.

VariableExampleDescription
<<TARGET_HOST>>192.168.10.1Hostname or IP address to test connectivity
<<PORT_NUMBER>>443TCP port number used by the application
<<LOG_PATH>>C:\Logs\netdiag.txtPath to store output logs

Verify reachability at the network layer.

Terminal window
ping <<TARGET_HOST>>

If there is no reply, check the following:

  • Whether ICMP is blocked by Windows Defender Firewall
  • Whether the target host is powered on
  • Whether routing settings are correct (route print)

Note: If ICMP responses are disabled in your environment, perform a TCP connectivity test instead.


Determine at which hop the communication fails.

Terminal window
tracert <<TARGET_HOST>>

Step 3: TCP Port Connectivity (Test-NetConnection)

Section titled “Step 3: TCP Port Connectivity (Test-NetConnection)”

Test whether communication at the application layer can be established.

Terminal window
Test-NetConnection -ComputerName <<TARGET_HOST>> -Port <<PORT_NUMBER>>

Key output fields:

FieldDescription
TcpTestSucceededIndicates whether the TCP connection succeeded
PingSucceededIndicates if ICMP succeeded
RemoteAddressResolved destination IP address
SourceAddressSource IP address used for the connection

Tip: If DNS is unstable, use the IP address directly for testing.


Step 4: Checking TCP Session Status (netstat / Get-NetTCPConnection)

Section titled “Step 4: Checking TCP Session Status (netstat / Get-NetTCPConnection)”

View current TCP connections and listening ports.

Terminal window
netstat -ano | findstr "<<PORT_NUMBER>>"

Option explanations:

  • -a: Show all connections and listening ports
  • -n: Display addresses and ports numerically
  • -o: Show process IDs

Identify the corresponding process:

Terminal window
tasklist /FI "PID eq <<PID_NUMBER>>"
Terminal window
Get-NetTCPConnection -State Established |
Select-Object LocalAddress, LocalPort, RemoteAddress, RemotePort, State, OwningProcess
Terminal window
Get-NetTCPConnection | Where-Object { $_.LocalPort -eq <<PORT_NUMBER>> }

A large number of SYN_SENT or TIME_WAIT states may indicate interrupted or excessively repeated connections.


Step 5: DNS Resolution Verification (nslookup / Resolve-DnsName)

Section titled “Step 5: DNS Resolution Verification (nslookup / Resolve-DnsName)”

Confirm that name resolution is functioning correctly.

Terminal window
nslookup <<TARGET_HOST>>

Detailed check with PowerShell:

Terminal window
Resolve-DnsName <<TARGET_HOST>> -Type A

Query a specific DNS server:

Terminal window
Resolve-DnsName <<TARGET_HOST>> -Type A -Server 8.8.8.8

Note: For IPv6 environments, use -Type AAAA.


If communication is blocked, enable firewall logging for analysis.

Terminal window
Set-NetFirewallProfile -Profile Domain,Public,Private `
-LogAllowed True -LogBlocked True `
-LogFileName "C:\Windows\System32\LogFiles\Firewall\pfirewall.log" `
-LogMaxSizeKilobytes 32767

The default log size is 1MB; increasing it simplifies analysis.

Terminal window
arp -a

If MAC address inconsistencies or duplicates are found, suspect switch or virtual NIC cache issues.


Most network issues can be systematically isolated in five steps:
ICMP connectivity → Route check → TCP connection → DNS resolution → Log analysis

By combining built-in tools such as ping, tracert, and netstat with PowerShell cmdlets like Get-NetTCPConnection, Resolve-DnsName, and Test-NetConnection, you can perform efficient and reproducible troubleshooting in Windows Server environments.