How to Troubleshoot Windows Server Network Connectivity with PowerShell
Applies to: Windows Server 2019, 2022 and 2025.
A structured network test moves from local adapter state through IP, route, DNS and application port instead of relying only on ping.
Network changes can immediately interrupt management access. Maintain console access, export the current configuration and use approved test addresses. Visit networkmanager.info for managed Windows VPS services.
Prerequisites
- Record the failing application and endpoint.
- Know expected IP, gateway, DNS and route.
- Maintain console access.
- Capture results before changing configuration.
Procedure
Step 1: Check adapters
Review link and error status.
Get-NetAdapter
Get-NetAdapterStatisticsStep 2: Inspect addressing
Check IP, gateway and DNS.
Get-NetIPConfiguration
Get-DnsClientServerAddressStep 3: Review routes
Find the selected default and specific route.
Get-NetRoute -AddressFamily IPv4 | Sort RouteMetricStep 4: Test DNS separately
Compare resolver and direct IP tests.
Resolve-DnsName networkmanager.infoStep 5: Test application port
Use the real protocol port.
Test-NetConnection networkmanager.info -Port 443 -InformationLevel DetailedStep 6: Trace path when needed
Inspect routing hops.
Test-NetConnection networkmanager.info -TraceRouteVerification
Compare results with a healthy peer and review firewall profile and rules.
Get-NetConnectionProfile
Get-NetFirewallProfile
Test-NetConnection networkmanager.info -Port 443Rollback
Diagnostic commands are read-only. Reverse only the specific IP, DNS, route, firewall or adapter change shown to cause the failure.
Security and operational notes
ICMP may be blocked even when an application port works; test the actual service.