Test whether a website or server port is reachable — via Microsoft Learn
Instead of guessing whether a firewall is blocking something, PowerShell's Test-NetConnection tries a real TCP connection to any host and port and tells you TcpTestSucceeded True or False.
Takes effect right away
Command
Run in a normal PowerShell / Terminal window.
Test-NetConnection -ComputerName example.com -Port 443
Test-NetConnection -ComputerName 192.168.1.10 -Port 3389 -InformationLevel DetailedUndo
# Read-only test: nothing to undo.Detailed output adds the interface and source address used, which helps with VPN or multi-adapter problems. Without -Port it does a ping test.Sources
- Test-NetConnection — by Microsoft Learn
- Source reviewed
- 2026-11-02
- Link checked
- 2026-11-02
- Tested hands-on
- Not by Oddbyte.Me
Oddbyte.Me hasn't tried this on every Windows build, so keep the undo handy.