How To Use Portqry ^new^ | DIRECT |
: portqry -n servername -p udp -e 135 Forces the query to use the UDP protocol (default is TCP). Understanding the Results PortQry returns one of three statuses for each port:
: portqry -n 10.0.0.1 -o 80,443,3389 Queries ports 80, 443, and 3389 in sequence. how to use portqry
HTTP response: 200 OK
UDP is harder to scan because it is connectionless. If a UDP port is open, it usually listens silently. PortQry sends a specific packet to elicit a response. : portqry -n servername -p udp -e 135
The -r flag enumerates all RPC services registered on the target—invaluable for Exchange or DCOM troubleshooting. If a UDP port is open, it usually listens silently
| Flag | Meaning | |------|---------| | -n | Target IP address or hostname | | -p | Protocol: tcp , udp , or both | | -e | Single port number to query | | -r | Range of ports (e.g., -r 135..139 ) | | -o | Order ports (comma-separated list) | | -l | Log file output |
: Extract the PortQry.exe file. For easier access, you can place it in your C:\Windows\System32 folder so it runs from any command prompt. Run : Open the Command Prompt (CMD) as an administrator. Common Command Examples