Question : Disabling a NIC with a command line

I have a windows 2003 server that I need to disable a NIC using a command line since I need to do this on a schedule. The sever has 2 NICs, one is connected to the local network while the other is connected to a DMZ. Enabling both will eventually mess with the traffic and folks will be unable to connect via the DMZ NIC. I need to enable the LAN NIC for backup purposes. That being said...

I have tried the netsh commands I have seen in the answers using search and I am unable to get this done using devcon.exe.

With netsh I have tried:
netsh interface set interface "LAN" DISABLED - - The syntax applied for this command is not valid (LAN is the NIC name)
netsh interface set interface "Broadcom NetXtreme 57xx Gigabit Controller" DISABLED - - An interface with this name is not registered (Broadcom... is the type of card as it is listed in device manager)

I have also tried several other commands but typically get the syntax error

I downloaded and attempted to use devcon.exe, but am not familiar with this utility and I am not quite sure what command to use or to go about using it. I dumped devcon.exe in C:\Documents and Settings\name since that is where CMD when started shows and I am able to use devcon.exe. I just need the command to use.

Answer : Disabling a NIC with a command line

http://www.jsifaq.com/SF/Tips/Tip.aspx?id=10930

This looks like it could work, haven't tried it ye though

Steve
Random Solutions  
 
programming4us programming4us