Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using netsh

Status
Not open for further replies.

bdowen

Programmer
Jun 10, 2003
12
US
This question may be out of place on this forum but I will ask it anyways.

I am using the netsh command. I want to be able to save my network configuration and reconfigure from my saved network configuration so I use the command:

netsh -c interface dump > f:\config.txt

What I get get is a text file call config that has these contents:

# Interface IP Configuration for "Local Area Connection

set address name="Local Area Connection" source=dhcp
set dns name="Local Area Connection" source=dhcp register=BOTH
set wins name="Local Area Connection" source=dhcp

My computer is on a network and I understand these lines to be commands wen the text file config.txt is restored using the command:
netsh -f f:\config.txt

Where my question arrises is that I do not know for sure what the lines in the text file are "storing" When I look at my ipconfig I have a IP Address(which is dynamically made so I am not too concerned about it) but I have a default Gateway address, a DHCP server address, and 5 DNS server addresses. When I restore using the above command, are these address restored. In other words what exactly is stored in text file that netsh dump produces???

Any help is greatly appreciated
 
The lines are not "storing" anything other than script parameters for specific DLLs to be called by NETSH.

It helps to think of NETSH as a kind of scripting host, similar to WSH. What the dump serves is as a kind of scripting utility for NETSH.

See if this link helps any:
 
thanks for the link, One more question though.

Do you know what this syntax means:
set dns name="Local Area Connection 2" source=static addr=(some #) register=BOTH

if I have more than one DNS Server address, only one shows up here from the "dump" output, how do I get the "dump" output to include all of the DNS Server addresses?
 
It gets the rest from the DHCP server.
Or, it should.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top