What is Netsh?
Netsh is a command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a computer that is currently running. Netsh also provides a scripting feature that allows you to run a group of commands in batch mode against a specified computer. Netsh can also save a configuration script in a text file for archival purposes or to help you configure other servers.
How to use Netsh?
To run a netsh command, you must start netsh from the Cmd.exe prompt and change to the context that contains the command you want to use.
Netsh int ip reset all. One of the handier commandline tools for Windows XP troubleshooting is to blindly type “netsh int ip reset all” into the Start - Run prompt. Here’s what it does, to my understanding: netsh: this is a Windows utility that allows one to display or change network settings locally or remotely. The first part of this. Dec 11, 2013 Now, I'm trying to figure it out how does 'netsh int ip reset' fix the problem, so I know what my application does wrong. I know is not the content of those 2 registry keys because I did the following on my virtual machine: Make a VM backup when the system is troubled. Launch the VM and run the 'netsh int ip reset' command; Export the two.
Netsh.exe is available on Windows 2000, Windows XP and Windows Server 2003.
-a AliasFile Specifies that an alias file is used. An alias file contains both a list of netsh commands and an aliased version of each. You can use the aliased command to shorten a Netsh command.
-c Context Specifies the default context for subsequent commands at the Netsh command prompt. Without the -c option, the default context is the root context netsh>.
-r RemoteMachine Specifies that the Netsh commands are run against a remote computer, as specified by either its computer name or IP address.
Command Specifies the netsh command to run. You must specify a full Netsh command, complete with parameters. Otherwise, Netsh displays command-line help. If the -c option is used, the context is included as part of the Netsh command.
-f ScriptFile Specifies that all of the Netsh commands in the ScriptFile file are run.
Available commands after you have entered the netsh command (typing netsh at the prompt and pressing enter).
Discards changes made while in offline mode.
Using Netsh
![Netsh Int Ip Reset All Netsh Int Ip Reset All](/uploads/1/2/9/5/129533012/488650488.jpg)
View your TCP/IP settings
Here is an example of command output:
Reset the TCP/IP Stack
A common use of netsh is to reset the TCP/IP stack to default, known-good parameters, a task that in Windows 98 required reinstallation of the TCP/IP adapter. In this mode you must provide a log file, which will be filled with what values netsh affected.
Delete arp cache
Deletes the arp cache entries for all available adapters (including the dial up adapter). Works well with DSL if you are able to ping the loopback address, and your own IP but nothing else.
Configure your computer’s IP address and other TCP/IP related settings
This command configures the interface named Local Area Connection with the static IP address 192.168.0.20, the subnet mask of 255.255.255.0, and a default gateway of 192.168.0.1
Configure your NIC to automatically obtain an IP address from a DHCP server:
Configure DNS:
Configure WINS:
Configure your NIC to dynamically obtain it’s DNS settings:
Import/Export your TCP/IP settings
Export your current IP settings to a text file. Use the following command:
Import your IP settings and change them, just enter the following command in a Command Prompt window (CMD.EXE):
Configure firewall
Enable/Disable Windows firewall
This will disable the Windows Firewall, we could use the following command to enable it:
Add Ports to the Exception List
Add applications to exceptions list
Again if we look at the exceptions list, MyProgram.exe has been added.
We can view the firewall configuration by running the following command:
Netsh Int Ip Reset Failed
Show network parameters
Netsh Int Ip Reset All Phone
The following commands are available:
Displays all of the Adapters.
Displays all categories.
Displays all network clients.
Displays computer information.
Displays the DHCP servers for each adapter.
Displays the DNS servers for each adapter.
Displays the default gateway servers for each adapter.
Netsh Int Ip Reset All Phone
Displays Internet Explorer’s server name and port number.
Displays the IP address for each adapter.
Displays the mail server name and port number.
Displays all modems.
Displays the news server name and port number.
Displays operating system information.
Displays all categories and performs all tests
Displays the Windows and WMI version.
![Vista Vista](/uploads/1/2/9/5/129533012/410248719.png)
Displays the primary and secondary WINS servers for each adapter.
Launch the GUI Network Diagnostic Program
Windows 10 Netsh Interface Commands
Source: https://lizardsystems.com/articles/configuring-network-settings-command-line-using-netsh/