By: Chief Editor/Director on 2022-02-14 at 10:26:33 | Views: 3

Port Query - Display the status of TCP and UDP ports, troubleshoot TCP/IP connectivity and security, return LDAP base query info, SMTP, POP3, IMAP4 status, enumerate SQL Server instances (UDP port 1434), Local ports, local services running (and the DLL modules loaded by each).Portqry.exe can query a single port, a list of several ports, or a sequential range of port numbers.SyntaxThe 3 modes are listed below: Command line, Local and Interactive mode.Command line mode: portqry -n name_to_query [-p protocol] [-e || -r || -o endpoint(s)] [other options]Command line mode options: -n [name_to_query] IP address or name of system to query -p [protocol] TCP or UDP or BOTH (default is TCP) -e [endpoint] single port to query (valid range: 1-65535) -r [end point range] range of ports to query (start:end) -o [end point order] range of ports to query in an order (x,y,z) -l [logfile] output a log file -y overwrite existing log file without prompting -sp [source port] initial source port to use for query -sl &qt;&qt;slow link delay&qt;&qt; waits longer for UDP replies from remote systems -nr by-passes default IP address-to-name resolution ignored unless an IP address is specified after -n -cn specifies SNMP community name for query ignored unless querying an SNMP port must be delimited with ! -q &qt;&qt;quiet&qt;&qt; operation runs with no output returns 0 if port is listening returns 1 if port is not listening returns 2 if port is listening or filteredLocal Mode:Local Mode gives detailed data on local system&qt;&qt;s ports portqry -local [-wt seconds] [-l logfile] [-v] portqry -wpid pid [-wt seconds] [-l logfile] [-v] portqry -wport port [-wt seconds] [-l logfile] [-v]Local mode options: -local Enumerate local port usage, port to process mapping, service port usage, and list loaded modules -wport [port_number] Watch the specified port report when the port&qt;&qt;s connection status changes -wpid [process_ID] Watch the specified process ID (PID) report when the PID&qt;&qt;s connection status changes -wt [seconds] watch time option specify how often to check for status changes valid range: 1 - 1200 seconds (default = 60 secs) -l [logfile] Log file to create -v Verbose outputInteractive Mode:An alternative to command line modeportqry -i [-options]For help with -i run portqry.exe and then type &qt;&qt;help&qt;&qt; Examplesportqry -localportqry -local -l MyLogFile.txt -vportqry -wpid 1272 -wt 5 -l MyLogFile.txt -y -vportqry -wport 53 -l dnslog.txtportqry -n myserver.com -e 25portqry -n -e 53 -p UDP -iportqry -n host1.dev.reskit.com -r 21:445portqry -n -o 25,445,1024 -p both -sp 53portqry -n host2 -cn !my community name! -e 161 -p udpNotesPortQry runs on Windows 2000 and later systems For best results run local commands in the context of local administrator.Port to process mapping may not be available on all systems.Defaults: TCP, port 80, no log file, slow link delay off Hit Ctrl-C to terminate prematurely.

Previous Next