Shine Tutorial    
  shinetutorialtopsideimage
HOME DOS OS C,C++ HTML CSS XML JAVA ASP PHP SQL OFFICE MULTIMEDIA MORE... CERTIFICATION ABOUT
 
S T ADVT
TUTORIALS
 

MS - DOS Command

« Previous Next Chapter »

Microsoft DOS netsh command

Quick links

About netsh
Availability
Syntax
Examples

About netsh

MS-DOS command that enables users to change network settings such as changing their network device from a dynamic address to a static address or changing the IP address.

Availability

The netsh.exe command is an external command accessed through C:\Winnt\System32 directory and is available in the below Microsoft operating systems.

Windows 2000
Windows XP
Windows Vista
Windows 7

Syntax

netsh [-a AliasFile] [-c Context] [-r RemoteMachine] [Command | -f ScriptFile]

? Displays a list of commands.
add Adds a configuration entry to a list of entries.

add helper Installs a helper DLL.
delete Deletes a configuration entry from a list of entries.

delete helper Deletes a helper DLL.
dump Displays a configuration script.
exec Runs a script file.
help Displays a list of commands.
interface Changes to the `interface' context.

ip Changes the 'interface ip' context.
ras Changes to the `ras' context.

aaaa Changes to the `ras aaaa' context.
appletalk Changes to the `ras appletalk' context.
ip Changes the 'ras ip' context.
ipx Changes to the `ras ipx' context.
netbeui Changes to the `ras netbeui' context.
routing Changes to the `routing' context.

ip Change to the 'routing ip' context.
ipx Changes to the `routing ipx' context.
set Updates configuration settings.

machine Sets the current machine on which to operate.
show Displays information.

show alias Lists all defined aliases.
show helper Lists all the top-level helpers.

Available commands after you have entered the netsh command (typing netsh at the prompt and pressing enter).

.. Goes up one context level.
? Displays a list of commands.
abort Discards changes made while in offline mode.
add Adds a configuration entry to a list of entries.
alias Adds an alias.
bye Exits the program.
commit Commits changes made while in offline mode.
delete Deletes a configuration entry from a list of entries.
dump Displays a configuration script.
exec Runs a script file.
exit Exits the program.
help Displays a list of commands.
interface Changes to the `interface' context.
offline Sets the current mode to offline.
online Sets the current mode to online.
popd Pops a context from the stack.
pushd Pushes current context on stack.
quit Exits the program.
ras Changes to the `ras' context.
routing Changes to the `routing' context.
set Updates configuration settings.
show Displays information.
unalias Deletes an alias.

Examples

netsh

Enter the netsh command.

netsh dump

Dump all the network information as a script to the screen. Can also be sent to a file by doing netsh dump > file.txt . This script can then be executed using the exec command.

set address name="Local Area Connection" source=dhcp

Set the "Local Area Connection" to DHCP.

set address local static 10.0.0.9 255.0.0.0 10.0.0.1 1

Set the local address to Static.

netsh interface ip show config

View network ip configuration. Below is an example of what may be seen.

Configuration for interface "Local Area Connection"
DHCP enabled: Yes
InterfaceMetric: 1
DNS servers configured through DHCP
WINS servers configured through DHCP


« Previous Next Chapter »