Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do I disable a wired network interface using Windows batch scripting?

What commands do I need to use?

share|improve this question

migrated from May 24 '11 at 0:37

This question came from our site for professional and enthusiast programmers.

My research indicates that this is not possible just using a batch file, you would need to use .NET code to talk to WMI or the Windows Script Host. The following two articles should help get you started:…… – Anonymous May 16 '11 at 22:42
Hi @Nick, welcome to Stack Overflow; you've just found out that our FAQ states, "the best Stack Overflow questions have a bit of source code in them". :) Perhaps you've confused Stack Overflow with ? Stack Overflow is a repository of high-quality questions and answers. Had you posted the code you've already tried, and asked for help, you probably would have gotten better results. (Of course, @DaveRead's links look very helpful.) You might also like to read for more advice on what we like to see in questions. – sarnold May 16 '11 at 22:57
uhm, which version of windows are you using? – yeedl May 24 '11 at 2:41

1 Answer 1

To disable an interface in Windows type in the console :

netsh interface set interface "My Interface Name " DISABLE

and to enable it :

netsh interface set interface "My Interface Name " ENABLE
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.