Это работает (Windows 8+):
static void SetIPv6State(Guid interfaceId, bool state)
{
var scope = new ManagementScope("\\\\.\\ROOT\\StandardCimv2");
var query = new ObjectQuery("SELECT * FROM MSFT_NetAdapterBindingSettingData");
var methodName = state ? "Enable" : "Disable";
using (var searcher = new ManagementObjectSearcher(scope, query))
using (var bindings = searcher.Get())
{
var binding = bindings.Cast<ManagementObject>().Single(obj => (string)obj["InstanceID"] == interfaceId.ToString("B").ToUpper() + "::ms_tcpip6");
var parameters = binding.GetMethodParameters(methodName);
binding.InvokeMethod(methodName, parameters, new InvokeMethodOptions());
}
}
для Windows 7 требуется C++ код.