PortQry is a small (under 1MB) but mighty tool that bridges the gap between basic pings and complex network analysis. By integrating it into your troubleshooting workflow, you can stop guessing whether a firewall is the culprit and start proving it with data. AI responses may include mistakes. Learn more
Microsoft officially lists PortQry as a "Legacy" tool. The modern replacement is PortQryUI (a graphical interface) or PowerShell cmdlets (specifically Test-NetConnection ). However, the command-line version remains widely used for scripting and forensic analysis due to its detailed output and "Test Mode" capabilities. portqry
| Parameter | Description | |-----------|-------------| | -n | Target IP address or hostname | | -p | Protocol: tcp or udp (default is TCP) | | -e | Single port number to query | | -r | Port range: start-end | | -o | Predefined service: ldap , rpc , dns , netbios , sql , etc. | | -l | Log file output | PortQry is a small (under 1MB) but mighty
| Tool | TCP | UDP | Range | Service Profiling | Firewall Detection | Default on Windows | |------|-----|-----|-------|--------------------|---------------------|---------------------| | | Yes | No | No | No | No | No (disabled) | | Test-NetConnection | Yes | No | Limited | No | Limited | Yes (PowerShell) | | nmap | Yes | Yes | Yes | Yes | Yes | No (third-party) | | Portqry | Yes | Yes | Yes | Yes | Yes | No (downloadable) | Learn more Microsoft officially lists PortQry as a
PortQry can be run in "Local Mode" to query the local machine's port usage. This is similar to running netstat -ano .