Search The Web

Showing posts with label network and sharing. Show all posts
Showing posts with label network and sharing. Show all posts

Sunday, March 11, 2012

stop and start network adapters in a batch file or DOS using netsh

Stop and Start Network Adapters in a Batch File or DOS using netsh.


Sometimes you may want to stop and start network adapters from a command line. This is especially true for when you want to use them in a DOS batch file.
To do this we are going to use Net Shell (netsh) which is a powerful command line based tool for managing network properties. net shells capabilities extend far beyond what we are doing here and i encourage you to investigate this further. To get a list of commands try typing " netsh /? " at a command line
netsh /? to display a list of net shell options
netsh /? to display a list of net shell options
Firstly you will want to find the name of the adapter. to do this, open Network and Sharing Center (in Win 7 and Vista) and choose Change adapter settings. Typically, the a LAN connection is named " Local Area Connection " and a wireless connection is named " Wireless Network Connection " . This can also be discerned from looking at an ipconfig read out, where for a LAN connection is will say Ethernet Adapter Local Area Connection " . if doing this remember to drop the Ethernet adapter portion of the name.
Another way to find the name is to open a DOS command and enter netsh interface show interface. The name listed in the interface name is the name of the connection. In this case was are focusing on the Wireless Network Connection
Use netsh interface  show interface  to show interface name in dos / powershell
Use netsh interface show interface to show interface name in dos / powershell
For this example we will use a wireless network adapter with the default name of "Wireless Network Connection"
The command to disable this connection is:
netsh interface set interface "Wireless Network Connection" DISABLE
netsh interface set interface " name" enable to enable interface in dos / powershell
netsh interface set interface " name" enable to enable interface in dos / powershell
to enable the adapter again, the command is:
netsh interface set interface "Wireless Network Connection" ENABLE
netsh interface set interface "<name>" enable to enable network interface is dos / powershell
netsh interface set interface "" enable to enable network interface is dos / powershell
as you can see, this would be really easy to put in a batch file to put in a start up or deploy in other methods.
for a video tutorial on this, please check the youtube video below:


This post can also be located at our sister site www.dizzyit.com at: http://wp.me/p1Zlmi-1u

Sunday, November 13, 2011

Create Network and Sharing Center Shortcut in Windows 7


In windows 7, it can be troublesome getting a Network and Sharing Center Shortcut for the desktop, which in my case is something i wanted for an SOE i was building. after some research i came across the following sollution:

1. go to the desktop, right click and select create new shortcut
2. In the create shortcut text box paste the following text:
C:\Windows\explorer.exe shell:::{8E908FC9-BECC-40f6-915B-F4CA0E70D03D}

3. Choose Next and then type in a name for the shortcut. I normally just use Network and Sharing Center as that’s what your creating a shortcut for in the first place!
4. Choose Finish and you’re done! from here if you wanted you could go and chance the icon and name from within the properties for the shortcut.



this is also repeated on our sister site www.dizzyit.com at: