• Welcome to netsh on Windows Vista/XP

    Posted on June 20th, 2009 admin Comments

    I hardly tinker with Windows as best way to fix windows is to reboot three times and if that fails toss it out and reload from a fresh copy using GNU ghost or something similar. Today I discovered a cool command-line tool called netsh –  kind of a network shell — that allows you to view, configure network and other settings for your Windows XP/Vista computer and even perhaps a remote one too.

    I wanted to get a “clean” ip configuration screen instead of what ipconfig shows and found netsh. For example:

    c:> netsh interface ip show config

    the above command shows a nice clean listing of the IP interfaces on my laptop.  Similarly:

    c:> netsh interface ip show neighbors

    the above command shows all the neighboring computers (that my laptop has communicated or learned about) on each of the interface.

    There are zillion options that you can try. One of the coolest thing you can do is dump all your computer’s network configuration in a single file using the following command:

    c:> netsh dump > net.config.txt

    This is a great way to keep a copy in case you plan to mess with network and not get messed up. To run the script back, you can run:

    c:> netsh exec net.config.txt

    What I actually needed this for…

    I wanted to get a list of all wireless networks that my laptop sees and I know that I can get it from the GUI but needed it on a text file that I can parse for something else. So instead of writing or downloading something new, I wanted to see if Windows can give me the info without causing too much pain, that’s netsh was found. So here is what I did:

    c:> netsh wlan show networks

    To see the details of your wireless interface, run:

    c:> netsh wlan show interfaces

    Here is a screenshot of clean information about my wlan interface:

    screen_hunter_1
    Typically, I use ipconfig which is often provides too much junk-info that I don’t care about. Looks like netsh is going to be my new favorite windows tool.

    blog comments powered by Disqus

Site last updated January 19, 2010 @ 8:52 pm; This content last updated June 20, 2009 @ 10:24 am