Disabling and enabling NIC adapter via a DOS command?

Posted by: tfabris

Disabling and enabling NIC adapter via a DOS command? - 16/04/2008 21:04

If, on Windows Server 2003, I wanted to disable and re-enable the NIC in a loop with specified delays between each, is there an easy way to do that from the command line?

I poked through the NETSH commands and couldn't see anything obvious. It's dead-obvious in Vista and Longhorn, not so much in 2003.
Posted by: tfabris

Re: Disabling and enabling NIC adapter via a DOS command? - 16/04/2008 21:21

Ah, looks like I just needed DEVCON.EXE.
Posted by: AndrewT

Re: Disabling and enabling NIC adapter via a DOS command? - 16/04/2008 21:25

Might be worth looking at cnic.exe too. Do a Ctrl-F a few times on http://technet.microsoft.com/en-us/magazine/cc160985.aspx
Posted by: tfabris

Re: Disabling and enabling NIC adapter via a DOS command? - 17/04/2008 15:42

Downloaded, looking at Cnic now. Thanks!
Posted by: siberia37

Re: Disabling and enabling NIC adapter via a DOS command? - 17/04/2008 19:29

A VBS Script using WMI would be able to do it. Might be easier to maintain in the long run rather than a batch file or a third-party program.