Udostępnij za pośrednictwem


Portqry Examples

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

PortQry Examples

Example 1: PortQry Default Behavior

To see the results of PortQry executed in its simplest form, type:

portqry /n 10.193.36.210

This command instructs PortQry to query TCP port 80, and determine whether it is listening on the target host (in this case 10.193.36.210).

PortQry displays results similar to the following output:

Querying target system called:

 10.193.36.210

Attempting to resolve IP address to a name...

IP address resolved to MYSERVER


TCP port 80 (http service): LISTENING

Example 2: Querying RPC Ports

To see the results of PortQry executed on an RPC port, type:

portqry /n 10.193.36.210 /p udp /e 135

PortQry displays results similar to the following output:

Querying target system called:

 10.193.36.210

Attempting to resolve IP address to a name...

IP address resolved to RKTLABDC2


UDP port 135 (epmap service): LISTENING or FILTERED
Querying Endpoint Mapper Database...
Server's response:

UUID: a00c021c-2be2-11d2-b678-0000f87a8f8e PERFMON SERVICE
ncacn_np:\\\\RKTLABDC2[\\pipe\\000003b8.000]

... 

UUID: d049b186-814f-11d1-9a3c-00c04fc9b232 NtFrs API
ncacn_np:\\\\RKTLABDC2[\\pipe\\000003b8.000]

Total endpoints found: 69



==== End of RPC Endpoint Mapper query response ====

UDP port 135 is LISTENING

Example 3: Querying an LDAP Port

To see the results of PortQry executed on an LDAP port, type:

portqry /n 10.193.36.210 /p udp /e 389

For more information on how PortQry works on an LDAP port, see Portqry Remarks.

PortQry displays results similar to the following output:

Querying target system called:

 10.193.36.210

Attempting to resolve IP address to a name...

IP address resolved to RKTLABDC2


UDP port 389 (unknown service): LISTENING or FILTERED

Sending LDAP query to UDP port 389...

LDAP query response:


currentdate: 04/19/2002 01:32:58 (unadjusted GMT)
subschemaSubentry: CN=Aggregate,CN=Schema,CN=Configuration,DC=mydom,DC=com
dsServiceName: CN=NTDS Settings,CN=MYSERVER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=mydom,DC=com
namingContexts: CN=Schema,CN=Configuration,DC=rktlabdom,DC=com
defaultNamingContext: DC=mydom,DC=com
schemaNamingContext: CN=Schema,CN=Configuration,DC=rktlabdom,DC=com
configurationNamingContext: CN=Configuration,DC=rktlabdom,DC=com
rootDomainNamingContext: DC=mydom,DC=com
supportedControl: 1.2.840.113556.1.4.319
supportedLDAPVersion: 3
supportedLDAPPolicies: MaxPoolThreads
highestCommittedUSN: 11019
supportedSASLMechanisms: GSSAPI
dnsHostName: myserver.mydom.com
ldapServiceName: mydom.com:myserver$@MYDOM.COM
serverName: CN=MYSERVER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=mydom,DC=com
supportedCapabilities: 1.2.840.113556.1.4.800
isSynchronized: TRUE
isGlobalCatalogReady: TRUE


======== End of LDAP query response ========

UDP port 389 is LISTENING

See Also

Concepts

Portqry Overview
Portqry Remarks
Portqry Syntax
Alphabetical List of Tools
Spcheck Overview
Nltest Overview
Netdom Overview
Netdiag Overview
Netcap Overview
Httpcfg Overview
Dnslint Overview
Dnscmd Overview
Dhcploc Overview
Dcdiag Overview
Browstat Overview
Xcacls Overview
Sidwkr.dll
Sidwalker Security Administration Tools
Sidwalk Overview
Showaccs Overview
Sdcheck Overview
Ktpass Overview
Ksetup Overview
Getsid Overview
Addiag.exe