Netshis a command-line scripting utility that allows you to, either locally or remotely, display, modify or script the network configuration of a computer that is currently running. The following examples based on XP SP2.
netsh -c diag
netsh diag>connect iphost chicagotech.net 80
IPHost = chicagotech.net
Port = 80
Server appears to be running on port(s) 
The following command configures the interface named chicagotechnet with the static IP address 10.0.5.99, the subnet mask of 255.255.255.0, and a default gateway of 10.0.5.1:
set address name="chicagotechnet" source=static addr=10.0.5.99 mask=255.255.255.0 gateway=10.0.5.1
To configure an defined wireless network, use this command:
netsh wlan connect ssid=mySSID name=WLAN-Profil1
With netsh, you can export and import your computer network configuration easy. To export your configuration, just do:
netsh c interface dump > test.txt
When you import this configuration, use this command
netsh f test.txt
You can administer remote access servers by typing netsh and then ras. Following are some commands manage RAS:
Netsh ras diagnostics context commands
Netsh ras IP context commands
Netsh ras AppleTalk context commands
Netsh ras AAAA context commands
1) netsh -c firewall
To run a netsh command, you can start netsh from the Cmd.exe prompt and change to the context that contains the command you want to use. Or you can do netsh -c option. If the contexts that are not available to you, you may receive an error message. For example, if you type netsh -c firewall at the Netsh command prompt, you change to the firewall context, but if you do not have firewall installed the following message appears:
The following command was not found: firewall.
If you need to run netsh with many configurations, you can create a script for each configuration and then run it using this command: netsh f <scriptfile>
You can configure remote computer uisng netsh with options -r for the machine, -u for the username, and -p for the password, for example:netsh -r cbg001314 -u cbg001314\blin -p password lan show config.
To switch the specified adapter from a static address to DHCP, type the
To change to a static address, type the following command:
to reset IP protocol using netsh
For troubleshooting TCP/IP issue, you may need to reset the TCP/IP protocol
stack configurations on your interface. To do that, use this command: netsh int
ipv4 reset resetlog.txt
For troubleshooting TCP/IP issue, you may need to reset the TCP/IP protocol stack configurations on your interface. To do that, use this command: netsh int ipv4 reset resetlog.txt
This web is provided "AS IS" with no warranties.
Copyright © 2002-2017 ChicagoTech.net, All rights reserved. Unauthorized reproduction forbidden.