Testing whether a remote TCP port opens from a Windows system helps separate service reachability problems from name-resolution, firewall, and application issues. It is a quick way to confirm whether traffic can complete a basic TCP connection before spending time on higher-level troubleshooting.
Windows includes the PowerShell cmdlet Test-NetConnection for network diagnostics. When run with -Port, it resolves the target name, attempts the TCP connection, and reports details such as the remote address, local interface, source address, and whether the handshake succeeded in the TcpTestSucceeded field.
A successful test proves only that the remote host accepted a TCP session on that port. It does not confirm application authentication, protocol negotiation, or UDP reachability, and a failed result can still be caused by DNS, routing, firewall policy, or the service listening on a different address or port. Using an IP address instead of a hostname avoids name-resolution variables when needed.
Administrator privileges are not required for a basic Test-NetConnection port test.
PS C:\> Test-NetConnection -ComputerName app01.example.net -Port 443 ComputerName : app01.example.net RemoteAddress : 203.0.113.20 RemotePort : 443 InterfaceAlias : Ethernet SourceAddress : 192.168.1.50 TcpTestSucceeded : True
TcpTestSucceeded : True means the target accepted a TCP connection on that port from the current Windows system.
Testing by hostname confirms both name resolution and TCP reachability in a single command.
PS C:\> Test-NetConnection -ComputerName app01.example.net -Port 443 -InformationLevel Detailed ComputerName : app01.example.net RemoteAddress : 203.0.113.20 RemotePort : 443 NameResolutionResults : 203.0.113.20 InterfaceAlias : Ethernet SourceAddress : 192.168.1.50 NetRoute (NextHop) : 192.168.1.1 TcpTestSucceeded : True
Detailed output adds name-resolution and route-selection information that helps explain which interface and next hop Windows chose.
PS C:\> Test-NetConnection -ComputerName app01.example.net -Port 443 -InformationLevel Quiet True
Quiet returns only True or False, which is useful in repeated checks and PowerShell scripts.
PS C:\> Test-NetConnection -ComputerName 203.0.113.20 -Port 443
PS C:\> Test-NetConnection -ComputerName app01.example.net -CommonTCPPort RDP ComputerName : app01.example.net RemoteAddress : 203.0.113.20 RemotePort : 3389 InterfaceAlias : Ethernet SourceAddress : 192.168.1.50 TcpTestSucceeded : True
CommonTCPPort accepts HTTP, RDP, SMB, and WINRM.
PS C:\> Test-NetConnection -ComputerName app01.example.net -Port 81 ComputerName : app01.example.net RemoteAddress : 203.0.113.20 RemotePort : 81 InterfaceAlias : Ethernet SourceAddress : 192.168.1.50 TcpTestSucceeded : False
TcpTestSucceeded : False means the TCP session did not open. Common causes include a stopped service, the wrong port number, firewall filtering, upstream access controls, or a service bound to a different address.