Netsh diagnostic (diag) commandsYou can use the Netsh Network Diagnostics commands, or diag context, to administer and troubleshoot operating system and network service parameters from the command line. The command prompt for the Netsh diagnostic context is netsh diag>. The following commands are available at the command prompt for the Netsh diagnostic context (as distinguished from the Windows XP command prompt). The Netsh Diag context is new to Windows XP. You cannot run Netsh Diag commands remotely on a Windows 2000 Server. For more information about netsh, see Using Netsh To view the command syntax, click a command: connect ieproxy Establishes, verifies, and then drops a TCP/IP connection with the proxy server specified in Internet Explorer. Syntaxconnect ieproxy Parametersnone Remarks
connect iphost Establishes, verifies, and then drops a TCP/IP connection to a specified host through a specified port. Syntaxconnect iphost Host Port ParametersHost : Specifies the IP address, NetBIOS name, or fully qualified domain name of the host to which you want to connect. Port : Specifies the port through which you want to connect. ExamplesTo connect to the host named microsoft.com through port 28, type: connect iphost microsoft.com 28 connect mail Establishes, verifies, and then drops a TCP/IP connection with the node specified as the mail server in the default Outlook Express profile of the current user. Syntaxconnect mail Parametersnone connect news Establishes, verifies, and then drops a TCP/IP connection with the node specified as the news server in the default Outlook Express profile of the current user. Syntaxconnect news Parametersnone dump Creates a script that contains the current configuration. Syntaxdump Parametersnone Remarks
gui Starts the network diagnostics tool in Help and Support Center. Syntaxgui Parametersnone ping Verifies connectivity with a specified remote host. Syntaxping Host ParametersHost : Specifies the IP address, NetBIOS name, or fully qualified domain name of the host with which you want to verify connectivity. ping adapter Verifies connectivity with computers and other devices (for example, routers) identified in the TCP/IP properties of the specified network adapter or adapters. Used without parameters, the ping adapter command verifies connectivity through all installed adapters. Syntaxping adapter [{IndexNumber | FullAdapterName | PartialAdapterName}] Parameters{IndexNumber | FullAdapterName | PartialAdapterName} : Specifies the adapter or adapters for which you want to verify connectivity. The IndexNumber parameter specifies the adapter by its index number. The FullAdapterName parameter specifies the adapter by its name as registered in the operating system. The PartialAdapterName parameter specifies the adapter or adapters whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, type an asterisk at the beginning of the parameter and at the end of the parameter. Remarks
ExamplesTo verify connectivity with all computers and other devices configured in the TCP/IP properties for each network adapter, type: ping adapter To verify connectivity with all computers and other devices configured in the TCP/IP properties for each network adapter with an index number of 2, type: ping adapter 2 To verify connectivity with all computers and other devices configured in the TCP/IP properties for each network adapter with "net" at the beginning of its name, type: ping adapter net* ping dhcp Verifies connectivity with the Dynamic Host Configuration Protocol (DHCP) servers configured in the TCP/IP properties for the specified adapter or adapters. Used without parameters, the ping dhcp command verifies connectivity with DHCP servers through all installed adapters. Syntaxping dhcp [{IndexNumber | FullAdapterName | PartialAdapterName}] Parameters{IndexNumber | FullAdapterName | PartialAdapterName} : Specifies the adapter or adapters for which you want to verify connectivity. The IndexNumber parameter specifies the adapter by its index number. The FullAdapterName parameter specifies the adapter by its name as registered in the operating system. The PartialAdapterName parameter specifies the adapter or adapters whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, type an asterisk at the beginning of the parameter and at the end of the parameter. Remarks
ExamplesTo verify connectivity with the DHCP server configured in the TCP/IP properties for each network adapter, type: ping dhcp To verify connectivity with the DHCP server configured in the TCP/IP properties for the network adapter with an index number of 2, type: ping dhcp 2 To verify connectivity with the DHCP server configured in the TCP/IP properties for each network adapter with "net" at the beginning of its name, type: ping dhcp net* ping dns Verifies connectivity with the Domain Name System (DNS) servers configured in the TCP/IP properties for the specified adapter or adapters. Used without parameters, the ping dns command verifies connectivity with DNS servers through all installed adapters. Syntaxping dns [{IndexNumber | FullAdapterName | PartialAdapterName}] Parameters{IndexNumber | FullAdapterName | PartialAdapterName} : Specifies the adapter or adapters for which you want to verify connectivity. The IndexNumber parameter specifies the adapter by its index number. The FullAdapterName parameter specifies the adapter by its name as registered in the operating system. The PartialAdapterName parameter specifies the adapter or adapters whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, type an asterisk at the beginning of the parameter and at the end of the parameter. Remarks
ExamplesTo verify connectivity with the DNS server configured in the TCP/IP properties for each network adapter, type: ping dns To verify connectivity with the DNS server configured in the TCP/IP properties for the network adapter with an index number of 2, type: ping dns 2 To verify connectivity with the DNS server configured in the TCP/IP properties for each network adapter with "net" at the beginning of its name, type: ping dns net* ping gateway Verifies connectivity with the default gateway servers configured in the TCP/IP properties for the specified adapter or adapters. Used without parameters, the ping gateway command verifies connectivity through all installed adapters. Syntaxping gateway [{IndexNumber | FullAdapterName | PartialAdapterName}] Parameters{IndexNumber | FullAdapterName | PartialAdapterName} : Specifies the adapter or adapters for which you want to verify connectivity. The IndexNumber parameter specifies the adapter by its index number. The FullAdapterName parameter specifies the adapter by its name as registered in the operating system. The PartialAdapterName parameter specifies the adapter or adapters whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, type an asterisk at the beginning of the parameter and at the end of the parameter. Remarks
ExamplesTo verify connectivity with the gateway server configured in the TCP/IP properties for each network adapter, type: ping gateway To verify connectivity with the gateway server configured in the TCP/IP properties for the network adapter with an index number of 2, type: ping gateway 2 To verify connectivity with the gateway server configured in the TCP/IP properties for each network adapter with "net" at the beginning of its name: ping gateway net* ping ieproxy Verifies connectivity with the Web server proxy for Internet Explorer. Syntaxping ieproxy Parametersnone ping ip Verifies connectivity with all IP addresses for the specified adapter or adapters. Used without parameters, the ping ip command verifies connectivity through all installed adapters. Syntaxping ip [{IndexNumber | FullAdapterName | PartialAdapterName}] Parameters{IndexNumber | FullAdapterName | PartialAdapterName} : Specifies the adapter or adapters for which you want to verify connectivity. The IndexNumber parameter specifies the adapter by its index number. The FullAdapterName parameter specifies the adapter by its name as registered in the operating system. The PartialAdapterName parameter specifies the adapter or adapters whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, type an asterisk at the beginning of the parameter and at the end of the parameter. Remarks
ExamplesTo verify connectivity with each network adapter, type: ping ip To verify connectivity with the network adapter with an index number of 2, type: ping ip 2 To verify connectivity with each network adapter with "net" at the beginning of its name, type: ping ip net* ping iphost Verifies connectivity with a remote or local host. Syntaxping iphost Node ParametersNode : Specifies a host by its IP address, its NetBIOS name, or its fully qualified domain name. ExamplesTo verify connectivity with the local host (at the loopback address of 127.0.0.1), type: ping iphost 127.0.0.1 To verify connectivity with the host microsoft.com, type: ping iphost microsoft.com ping loopback Verifies connectivity with the local host loopback address (127.0.0.1). Syntaxping loopback Parametersnone ping mail Verifies connectivity with the mail server configured in the default Outlook Express profile of the current user. Syntaxping mail Parametersnone ping news Verifies connectivity with the mail server configured in the default Outlook Express profile of the current user. Syntaxping news Parametersnone ping wins Verifies connectivity with the preferred and alternate Windows Internet Name Service (WINS) servers for the specified network adapter or adapters. Used without parameters, ping wins verifies connectivity through all installed adapters. Syntaxping wins [{IndexNumber | FullAdapterName | PartialAdapterName}] Parameters{IndexNumber | FullAdapterName | PartialAdapterName} : Specifies the adapter or adapters for which you want to verify connectivity. The IndexNumber parameter specifies the adapter by its index number. The FullAdapterName parameter specifies the adapter by its name as registered in the operating system. The PartialAdapterName parameter specifies the adapter or adapters whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, type an asterisk at the beginning of the parameter and at the end of the parameter. Remarks
ExamplesTo verify connectivity with the WINS servers whose IP addresses are configured in the TCP/IP properties of each installed adapter, type: ping wins To verify connectivity with the WINS servers whose IP addresses are configured in the TCP/IP properties of each installed adapter with an index number number of 2, type: ping wins 2 show adapter Shows information about the specified logical adapter or adapters. Used without parameters, the show adapter command shows information about all adapters defined for this server. Syntaxshow adapter [{IndexNumber | FullAdapterName | PartialAdapterName}] [{/v | /p}] Parameters{IndexNumber | FullAdapterName | PartialAdapterName} : Specifies the adapter or adapters for which you want to show information. The IndexNumber parameter specifies the adapter by its index number. The FullAdapterName parameter specifies the adapter by its name as registered in the operating system. The PartialAdapterName parameter specifies the adapter or adapters whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, type an asterisk at the beginning of the parameter and at the end of the parameter. {/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. Remarks
ExamplesTo display the logical adapters defined on the computer, type: show adapter show all Lists all network objects defined for the local server. Used without parameters, the show all command lists overview configuration information for the following hardware and software components: Default Outlook Express Mail, Default Outlook Express News, Internet Explorer Web Proxy, Loopback, Computer System, Operating System, Version, Modems, Network Adapters, and Network Clients. Syntaxshow all [{/v | /p}] Parameters{/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. Remarks
show client Lists all network clients defined for the specified adapter or adapters. Used without parameters, show client lists clients for all installed adapters. Syntaxshow client [{IndexNumber | FullAdapterName | PartialAdapterName}] [{/v | /p}] Parameters{IndexNumber | FullAdapterName | PartialAdapterName} : Specifies the adapter or adapters for which you want to list clients. The IndexNumber parameter specifies the adapter by its index number. The FullAdapterName parameter specifies the adapter by its name as registered in the operating system. The PartialAdapterName parameter specifies the adapter or adapters whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, type an asterisk at the beginning of the parameter and at the end of the parameter. {/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. Remarks
ExamplesTo list all network clients defined for all network adapters in the host, type: show client To list all fields with non-null values for all network clients defined for adapter number 2, type: show client 2 /p show computer Lists Windows Management Interface (WMI) details for the server. Used without parameters, the show computer command lists the NetBIOS name of the local computer. Syntaxshow computer [{/v | /p}] Parameters{/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. ExamplesTo list all non-null WMI interface parameters for the server: show computer /p show dhcp Lists all DHCP servers defined for the specified adapter. Used without parameters, the show dhcp command lists the servers defined for all installed adapters. Syntaxshow dhcp {IndexNumber | FullAdapterName | PartialAdapterName} [{/v | /p}] Parameters{IndexNumber | FullAdapterName | PartialAdapterName} : Specifies the adapter or adapters for which you want to list servers. The IndexNumber parameter specifies the adapter by its index number. The FullAdapterName parameter specifies the adapter by its name as registered in the operating system. The PartialAdapterName parameter specifies the adapter or adapters whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, type an asterisk at the beginning of the parameter and at the end of the parameter. {/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. Remarks
ExamplesTo list details of all DHCP servers defined for all network adapters, type: show dhcp /v To list details of any DHCP servers defined for network adapter 2, type: show dhcp 2 show dns Lists all DNS servers defined for a specified adapter. Used without parameters, the show dns command lists servers defined for all installed adapters. Syntaxshow dns [{IndexNumber | FullAdapterName | PartialAdapterName}] [{/v | /p}] Parameters{IndexNumber | FullAdapterName | PartialAdapterName} : Specifies the adapter or adapters for which you want to list servers. The IndexNumber parameter specifies the adapter by its index number. The FullAdapterName parameter specifies the adapter by its name as registered in the operating system. The PartialAdapterName parameter specifies the adapter or adapters whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, type an asterisk at the beginning of the parameter and at the end of the parameter. {/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. Remarks
ExamplesTo list all non-null details of all DNS servers defined for all network adapters, type: show dns /p To list any DNS servers defined for network adapter 2, type: show dns 2 show gateway Lists all Internet gateways defined for the specified adapter or adapters. Used without parameters, the show gateway command lists gateways defined for all installed adapters. Syntaxshow gateway [{IndexNumber | FullAdapterName | PartialAdapterName}] [{/v | /p}] Parameters{IndexNumber | FullAdapterName | PartialAdapterName} : Specifies the adapter or adapters for which you want to list gateways. The IndexNumber parameter specifies the adapter by its index number. The FullAdapterName parameter specifies the adapter by its name as registered in the operating system. The PartialAdapterName parameter specifies the adapter or adapters whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, type an asterisk at the beginning of the parameter and at the end of the parameter. {/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. Remarks
ExamplesTo list all available details about all Internet gateways defined for all adapters, type: show gateway /v To list all non-null values available for any gateways defined for network adapter 3, type: show gateway 3 /p show ieproxy Lists Internet Explorer proxy servers defined for the specified adapter or adapters. Used without parameters, show ieproxy lists the servers for all installed adapters. Syntaxshow ieproxy [{IndexNumber | FullAdapterName | PartialAdapterName}] [{/v | /p}] Parameters{IndexNumber | FullAdapterName | PartialAdapterName} : Specifies the adapter or adapters for which you want to list servers. The IndexNumber parameter specifies the adapter by its index number. The FullAdapterName parameter specifies the adapter by its name as registered in the operating system. The PartialAdapterName parameter specifies the adapter or adapters whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, you must type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, you must type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, you must type an asterisk at the beginning of the parameter and at the end of the parameter. {/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. Remarks
ExamplesTo list all Internet Explorer proxy servers defined for all network adapters in the server, type: show ieproxy show ip Shows information about the specified adapter or adapters for which TCP/IP is enabled. Used without parameters, the show ip command shows information for all installed adapters. Syntaxshow ip [{IndexNumber | FullAdapterName | PartialAdapterName}] [{/v | /p}] Parameters{IndexNumber | FullAdapterName | PartialAdapterName} : Specifies the adapter or adapters for which you want to show information. The IndexNumber parameter specifies the adapter by its index number. The FullAdapterName parameter specifies the adapter by its name as registered in the operating system. The PartialAdapterName parameter specifies the adapter or adapters whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, type an asterisk at the beginning of the parameter and at the end of the parameter. {/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. Remarks
ExamplesTo list the index number, name, and TCP/IP address for all adapters for which TCP/IP is enabled, type: show ip show mail Shows the Outlook Express mail server specified for the local computer. Used without parameters, the show mail command lists overview configuration information for Default Outlook Express Mail. Syntaxshow mail [{/v | /p}] Parameters{/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. ExamplesTo display the mail server configured for the local computer, type: show mail show modem Lists details about the specified modem device or devices configured on the local computer. Used without parameters, show modem lists details about all modem devices. Syntaxshow modem [{IndexNumber | FullModemName | PartialModemName}] [{/v | /p}] Parameters{IndexNumber | FullModemName | PartialModemName} : Specifies the modem device or devices for which you want to list details. The IndexNumber parameter specifies the device by its index number. The FullModemName parameter specifies the device by its name as registered in the operating system. The PartialModemName specifies the device or devices whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, type an asterisk at the beginning of the parameter and at the end of the parameter. {/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. ExamplesTo show all details, even those with null values, about all modem devices configured on the local computer, type: show modem /v To show the name and index number of all modem devices configured on the local computer with "dialup" at the beginning of their names, type: show modem dialup* show news Displays configuration information for the news server defined for the local computer. Used without parameters, the show news command lists overview configuration information for Default Outlook Express News. Syntaxshow news [{/v | /p}] Parameters{/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. ExamplesTo display the name and the TCP/IP address of the news server, type: show news show os Displays information about the operating system running on the local computer. Syntaxshow os [/v] Parameters/v : Specifies that fields with a null value should appear. Remarks
show test Shows all network objects defined for the local computer and verifies connectivity with each object using the ping command. Used without parameters, the show test command lists overview configuration information for the following hardware and software components: Default Outlook Express Mail, Default Outlook Express News, Internet Explorer Web Proxy, Loopback, Computer System, Operating System, Version, Modems, Network Adapters, and Network Clients. In addition, connectivity is verified with the Loopback adapter and all IP addresses configured as a client option in the TCP/IP properties of each network adapter. Syntaxshow test [{/v | /p}] Parameters{/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. Remarks
ExamplesTo show all information available to the Netsh diagnostic context, type: show test /v show version Shows the version of the operating system and, optionally, the version of Windows Management Infrastructure (WMI). Used without parameters, the show version command lists the version number of the operating system installed on the local computer. Syntaxshow version [{/v | /p}] Parameters{/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. Remarks
ExamplesTo show the version of the operating system and WMI, including fields with a null value, type: show version /v show wins Lists WINS servers for the specified adapter or adapters. Used without parameters, the show wins command lists servers for all installed adapters. Syntaxshow wins [{IndexNumber | FullAdapterName | PartialAdapterName}] [{/v | /p}] Parameters{IndexNumber | FullAdapterName | PartialAdapterName} : Specifies the adapter or adapters for which you want to list servers. The IndexNumber parameter specifies the adapter by its index number. The FullAdapterName parameter specifies the adapter by its name as registered in the operating system. The PartialAdapterName parameter specifies the adapter or adapters whose names contain the sequence of characters specified in the parameter. If the sequence of characters must appear at the beginning of the name, type an asterisk at the end of the parameter. If the sequence of characters must appear at the end of the name, type an asterisk at the beginning of the parameter. If the sequence of characters can appear anywhere in the name, type an asterisk at the beginning of the parameter and at the end of the parameter. {/v | /p} : Specifies whether fields with a null value should appear. The /v parameter specifies that the fields should appear. The /p parameter specifies that the fields should not appear. Remarks
ExamplesTo list the WINS servers defined for all adapters on the server, type: show wins To list the WINS servers specified for the adapter with index number 2, type: show wins 2 Formatting legend
|