text
stringlengths
0
4.23k
/?
Displays help at the command prompt.
[<drive>:]<path>
%PATH%
Remarks
The Windows operating system searches using default file name extensions in the following order of precedence: .exe, .com, .bat, and .cmd. Which means if you're looking for a batch file named, acct.bat, but have an app named acct.exe in the same directory, you must include the .bat extension at the command prompt.
If two or more files in the command path have the same file name and extension, this command first searches for the specified file name in the current directory. Then, it searches the directories in the command path in the order that they're listed in the PATH environment variable.
If you place the path command in your Autoexec.nt file, the Windows operating system automatically appends the specified MS-DOS subsystem search path every time you log on to your computer. Cmd.exe does not use the Autoexec.nt file. When started from a shortcut, Cmd.exe inherits the environment variables set in My Computer/Properties/Advanced/Environment.
Examples
To search the paths c:\user\taxes, b:\user\invest, and b:\bin for external commands, type:
path c:\user\taxes;b:\user\invest;b:\bin
pathping
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012
Provides information about network latency and network loss at intermediate hops between a source and destination. This command sends multiple echo Request messages to each router between a source and destination, over a period of time, and then computes results based on the packets returned from each router. Because this command displays the degree of packet loss at any given router or link, you can determine which routers or subnets might be having network problems. Used without parameters, this command displays help.
Note
This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component in the properties of a network adapter in Network Connections.
Additionally, this command identifies which routers are on the path, same as using the tracert command. Howevever, this command also sends pings periodically to all of the routers over a specified time period and computes statistics based on the number returned from each.
Syntax
pathping [/n] [/h <maximumhops>] [/g <hostlist>] [/p <Period>] [/q <numqueries> [/w <timeout>] [/i <IPaddress>] [/4 <IPv4>] [/6 <IPv6>][<targetname>]
Parameters
Parameter
Description
/n
Prevents pathping from attempting to resolve the IP addresses of intermediate routers to their names. This might expedite the display of pathping results.
/h <maximumhops>
Specifies the maximum number of hops in the path to search for the target (destination). The default is 30 hops.
/g <hostlist>
Specifies that the echo Request messages use the Loose Source Route option in the IP header with the set of intermediate destinations specified in hostlist. With loose source routing, successive intermediate destinations can be separated by one or multiple routers. The maximum number of addresses or names in the host list is 9. The hostlist is a series of IP addresses (in dotted decimal notation) separated by spaces.
/p <period>
Specifies the number of milliseconds to wait between consecutive pings. The default is 250 milliseconds (1/4 second). This parameter sends individual pings to each intermediate hop. Because of this, the interval between two pings sent to the same hop is period multiplied by the number of hops.
/q <numqueries>
Specifies the number of echo Request messages sent to each router in the path. The default is 100 queries.
/w <timeout>
Specifies the number of milliseconds to wait for each reply. The default is 3000 milliseconds (3 seconds). This parameter sends multiple pings in parallel. Because of this, the amount of time specified in the timeout parameter isn't bounded by the amount of time specified in the period parameter for waiting between pings.
/i <IPaddress>
Specifies the source address.
/4 <IPv4>
Specifies that pathping uses IPv4 only.
/6 <IPv6>
Specifies that pathping uses IPv6 only.
<targetname>
Specifies the destination, which is identified either by IP address or host name.
/?
Displays help at the command prompt.
<maximumhops>
<hostlist>
<period>
<numqueries>
<timeout>
<IPaddress>
<IPv4>
<IPv6>
<targetname>
Remarks
All parameters are case-sensitive.
To avoid network congestion and to minimize the effects of burst losses, pings should be sent at a sufficiently slow pace.
Example of the pathping command output
D:\>pathping /n contoso1
Tracing route to contoso1 [10.54.1.196]
over a maximum of 30 hops:
0 172.16.87.35
1 172.16.87.218
2 192.168.52.1
3 192.168.80.1
4 10.54.247.14
5 10.54.1.196