View of the properties window.

I need to figure out a way to automate the disabling of certain network protocols of specific network adapters. I know I can open up the window and uncheck the various protocols such as "Internet Protocol Version 6 (TCP/IPv6)" from a specific network adapter's properties window, but I need to find a way to do that via command-line or via the registry so that I can automate the process. Any ideas? -Thanks!


I've done this for some of the scripts I use at work.

At any time there are a number of adapters registered, some loopback. The main problem is in detecting the correct ones your targeting, and then filtering out the rest. You should also be aware that changes made by the utility netsh may not propagate to the wmi interface until a reboot is completed.

I would suggest looking into the WMI member functions of Win32_NetworkAdapterConfiguration or using netsh.

You don't reference an OS, I assume your referring to windows. I would suggest Powershell as it comes bundled with Windows 7 and later and is installable on previous systems. It also allows access to the dotnet function api.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.