How do I disable NICs via scripting?

  • Thread starter Thread starter Theo Welles
  • Start date Start date
T

Theo Welles

Hi All

I need to disable/enable the NICs on a Win2k box using a script....

Can I do that? What command should I use?

Thanks a lot!

Theo
 
Hi Theo,

Not exaclty what you want, but this may help:

If you want to disable the interface to prevent traffic from being passed
by the network adapter, you can use the Netshell tool to set a different IP
address (such as a private IP address) or default gateway (which in effect,
disables the network adapter). The following example shows the syntax for
this configuration:



netshell interface ip set address interface_name static ip_address
subnet_mask default_gateway metric

262265 Error Message When You Use Netsh.exe to Enable or Disable a Network
http://support.microsoft.com/?id=262265

Thanks,
Marc Reynolds
Microsoft Technical Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top