enable / disable network interface through scripts.

How can I enable / disable a network card on windows 2003 through a .bat script?
Who is Participating?
Rob WilliamsCommented:
To disable:
netsh interface set interface “Local Area Connection” disabled
To enable:
netsh interface set interface “Local Area Connection” enabled

Must be run by an admin, and spelling of your network adapter name, such as; “Local Area Connection”, must be exact.
If that's not it, you may can get this working with devcon...http://support.microsoft.com/kb/311272
Rob WilliamsCommented:
netsh works on 2003 but you will need sirbounty's option if using XP or other.
Rob WilliamsCommented:
Thanks eggster34.
Cheers !
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.