Tip: Changing network configuration via Command Line
Some times you want to set the: IP, subnet mask, gateway and DNS via a command line. In order to do that You can use commands in the Netsh Interface IP context to configure the TCP/IP protocol (including addresses, default gateways, DNS servers, and WINS servers) and to display configuration and statistical information.
You can run these commands from the Windows XP command prompt or from the command prompt for the Netsh Interface IP context.
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.
Netsh interacts with other operating system components using dynamic-link library (DLL) files. Each Netsh helper DLL provides an extensive set of features called a context, which is a group of commands specific to a networking component. These contexts extend the functionality of netsh by providing configuration and monitoring support for one or more services, utilities, or protocols.
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. The contexts that are available to you depend on which networking components you have installed. For example, if you type dhcp at the Netsh command prompt, you change to the DHCP context
A simple Example is to change the IP, subnet mask, gateway and DNS. To do that all you have to do is.
- Go to Start -> Run
- Type Cmd and Enter
- In the Command Prompt Shell Type:
netsh interface ip set address "Local Area Connection" static 192.168.0.100 255.255.255.0 192.168.0.1 2
You can find out more about Netsh here











RSS Feeds 


