About netsh command

J

Jeff Fan

Hi All,

I have known this command netsh for a while, but I have never used it. Do
you guys have some examples using netsh on daily admin.

Thanks

Jeff Fan
 
T

Torgeir Bakken (MVP)

Jeff said:
I have known this command netsh for a while, but I have never used it. Do
you guys have some examples using netsh on daily admin.

Hi

How to Use the Netsh.exe Tool and Command-Line Switches
http://support.microsoft.com/default.aspx?scid=kb;EN-US;242468


Some simple examples:

For a Static IP use:
netsh interface ip set address "Local Area Connection" static 125.187.7.56
255.0.0.0

And for DHCP use:
netsh interface ip set address "Local Area Connection" DHCP

More here:

From: Jerry ([email protected])
Subject: Re: Change TCP/IP info on Win2k via VBScript
Newsgroups: microsoft.public.scripting.vbscript
Date: 2002-09-06 22:56:10 PST
http://groups.google.com/[email protected]

From: Jim de Graff ([email protected])
Subject: Re: Enable DHCP?
Newsgroups: microsoft.public.scripting.wsh,
microsoft.public.win2000.cmdprompt.admin
Date: 2002-09-16 12:48:43 PST
http://groups.google.com/groups?selm=#cqQ7waXCHA.2404@tkmsftngp10
 
H

Herb Martin

And a trick that helped me:

Dump the current settings to a "script file" suitable for
reconfiguring the station:

netsh dump >dump.txt

Now you can open, and review or edit the dump.txt
file.

You can also dump specific contexts (interface, AAAA, etc.)
or just edit out the pieces you need/don't need.\


Then run:

netsh -f dump.txt

And you get those settings reapplied (be careful.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top