Command Reference
Test-NetConnection
Gnojo Analysis
Understanding Test-NetConnection
What This Command Does
Tests name resolution, reachability, routing, or a specific TCP service port.
When to Use It
Use Test-NetConnection when troubleshooting networking issues and you need information that can help narrow down the cause.
What to Look For
RemoteAddress
Address selected after name resolution.
TcpTestSucceeded
Whether a TCP connection reached the requested port.
SourceAddress
Local address used for the test.
Permissions
Administrator access is not normally required for this command.
Risk and impact
Use only approved destinations; a failed test can reflect a firewall policy rather than an outage.
Typical Next Steps
Continue troubleshooting with one of these related commands:
Summary
Tests name resolution, reachability, routing, or a specific TCP service port.
Syntax
Test-NetConnection <ComputerName> [-Port <Int32>] [-InformationLevel Detailed]
Examples
Test-NetConnection www.microsoft.com -Port 443
Tests DNS resolution and TCP connectivity to HTTPS on the named host.
Permissions
Administrator required: No
Standard reachability and TCP tests usually do not require elevation.
Risk and Impact
Risk level: Low
Changes the system: No
Use only approved destinations; a failed test can reflect a firewall policy rather than an outage.
Supported Platforms
Important Output Fields
RemoteAddress
Address selected after name resolution.
TcpTestSucceeded
Whether a TCP connection reached the requested port.
SourceAddress
Local address used for the test.
Common Errors
TCP connect failed
The port is blocked, closed, filtered, or unreachable.
Related Commands
Continue troubleshooting with related diagnostic commands.
Official References
Test-NetConnection
Microsoft Learn · Official Documentation